mirror of
https://github.com/evennia/evennia.git
synced 2026-03-31 21:17:17 +02:00
Possible fix to bad disconnection issue.
This commit is contained in:
parent
e79f68bbe1
commit
1a26552600
1 changed files with 10 additions and 4 deletions
|
|
@ -146,10 +146,16 @@ class ServerSessionHandler(SessionHandler):
|
|||
from the portal side.
|
||||
"""
|
||||
session = self.sessions.get(sessid, None)
|
||||
if session:
|
||||
session.disconnect()
|
||||
del self.sessions[session.sessid]
|
||||
self.session_count(-1)
|
||||
if not session:
|
||||
return
|
||||
player = session.player
|
||||
if player:
|
||||
nsess = len(self.sessions_from_player(player))
|
||||
remaintext = nsess and "%i session%s remaining" % (nsess, nsess > 1 and "s" or "") or "no more sessions"
|
||||
session.log(_('Connection dropped: %s %s (%s)' % (session.player, session.address, remaintext)))
|
||||
session.at_disconnect()
|
||||
session.disconnect()
|
||||
del self.sessions[session.sessid]
|
||||
|
||||
def portal_session_sync(self, portalsessions):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue