mirror of
https://github.com/evennia/evennia.git
synced 2026-03-22 15:56:30 +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
|
|
@ -408,7 +408,7 @@ class CmdWho(MuxCommand):
|
|||
table[0].append(plr_pobject.name[:25])
|
||||
table[1].append(utils.time_format(delta_conn, 0))
|
||||
table[2].append(utils.time_format(delta_cmd, 1))
|
||||
table[3].append(plr_pobject.location.id)
|
||||
table[3].append(plr_pobject.location and plr_pobject.location.id or "None")
|
||||
table[4].append(session.cmd_total)
|
||||
table[5].append(session.address[0])
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -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