mirror of
https://github.com/evennia/evennia.git
synced 2026-03-21 07:16:31 +01:00
Fixed a bug in sessionhandler that erroneously caused Portal sessions to not be deleted properly at user @quit. This caused the session to be copied back to the Server side after a reload (caused "ghost" connections in e.g. the "who" command). Resolves Issue 244.
This commit is contained in:
parent
7dcfdc4d4b
commit
f0f240b7ce
2 changed files with 5 additions and 2 deletions
|
|
@ -379,6 +379,9 @@ class PortalSessionHandler(SessionHandler):
|
|||
session = self.sessions.get(sessid, None)
|
||||
if session:
|
||||
session.disconnect(reason)
|
||||
if sessid in self.sessions:
|
||||
# in case sess.disconnect doesn't delete it
|
||||
del self.sessions[sessid]
|
||||
del session
|
||||
|
||||
def server_disconnect_all(self, reason=""):
|
||||
|
|
@ -388,7 +391,7 @@ class PortalSessionHandler(SessionHandler):
|
|||
for session in self.sessions.values():
|
||||
session.disconnect(reason)
|
||||
del session
|
||||
|
||||
self.sessions = {}
|
||||
|
||||
def count_loggedin(self, include_unloggedin=False):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue