Fix error in MULTISESSION_MODE=0 that would not correctly disconnect duplicate sessions but just unpuppet them
This commit is contained in:
parent
e37fdc110f
commit
63bf978b39
1 changed files with 5 additions and 1 deletions
|
|
@ -593,10 +593,14 @@ class ServerSessionHandler(SessionHandler):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
uid = curr_session.uid
|
uid = curr_session.uid
|
||||||
|
# we can't compare sessions directly since this will compare addresses and
|
||||||
|
# mean connecting from the same host would not catch duplicates
|
||||||
|
sid = id(curr_session)
|
||||||
doublet_sessions = [sess for sess in self.values()
|
doublet_sessions = [sess for sess in self.values()
|
||||||
if sess.logged_in and
|
if sess.logged_in and
|
||||||
sess.uid == uid and
|
sess.uid == uid and
|
||||||
sess != curr_session]
|
id(sess) != sid]
|
||||||
|
|
||||||
for session in doublet_sessions:
|
for session in doublet_sessions:
|
||||||
self.disconnect(session, reason)
|
self.disconnect(session, reason)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue