Crash fix for what might be timing out sessions at the login prompt.

This commit is contained in:
Greg Taylor 2007-05-16 18:25:44 +00:00
parent 974c20efc7
commit 17bbc4c3b3

View file

@ -79,8 +79,10 @@ class PlayerSession(async_chat):
Break the connection and do some accounting. Break the connection and do some accounting.
""" """
pobject = self.get_pobject() pobject = self.get_pobject()
if pobject:
pobject.set_flag("CONNECTED", False) pobject.set_flag("CONNECTED", False)
pobject.get_location().emit_to_contents("%s has disconnected." % (pobject.get_name(),), exclude=pobject) pobject.get_location().emit_to_contents("%s has disconnected." % (pobject.get_name(),), exclude=pobject)
async_chat.handle_close(self) async_chat.handle_close(self)
self.logged_in = False self.logged_in = False
session_mgr.remove_session(self) session_mgr.remove_session(self)