From 63bf978b39d238a1b03858b4886c98ff9a548b81 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 21 Jan 2018 12:29:22 +0100 Subject: [PATCH] Fix error in MULTISESSION_MODE=0 that would not correctly disconnect duplicate sessions but just unpuppet them --- evennia/server/sessionhandler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/evennia/server/sessionhandler.py b/evennia/server/sessionhandler.py index 423bc87f1c..5ea0d08c9f 100644 --- a/evennia/server/sessionhandler.py +++ b/evennia/server/sessionhandler.py @@ -593,10 +593,14 @@ class ServerSessionHandler(SessionHandler): """ 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() if sess.logged_in and sess.uid == uid and - sess != curr_session] + id(sess) != sid] + for session in doublet_sessions: self.disconnect(session, reason)