Add sessionhandler.portal_disconnect_all to remove another needless call between server and portal on logout. This means logout from either side will clean up on the respective side and then inform the other side once, rather than triggering a return call.

This commit is contained in:
Griatch 2016-09-13 21:48:43 +02:00
parent 8eb500f8e0
commit 86c970eb62
7 changed files with 54 additions and 9 deletions

View file

@ -168,8 +168,7 @@ class Portal(object):
# we get here due to us calling reactor.stop below. No need
# to do the shutdown procedure again.
return
for session in self.sessions.itervalues():
session.disconnect()
self.sessions.disconnect_all()
self.set_restart_mode(restart)
if os.name == 'nt' and os.path.exists(PORTAL_PIDFILE):
# for Windows we need to remove pid files manually