Browse Source

Merge pull request #33 from sillygod/fix_handle_disconnect

fix the order of triggered disconnect event
pull/41/head
Miguel Grinberg 9 years ago
committed by GitHub
parent
commit
0ee6fca86d
  1. 2
      socketio/server.py

2
socketio/server.py

@ -384,8 +384,8 @@ class Server(object):
namespace_list = [namespace]
for n in namespace_list:
if n != '/' and self.manager.is_connected(sid, n):
self.manager.disconnect(sid, n)
self._trigger_event('disconnect', n, sid)
self.manager.disconnect(sid, n)
if namespace == '/' and self.manager.is_connected(sid, namespace):
self._trigger_event('disconnect', '/', sid)
self.manager.disconnect(sid, '/')

Loading…
Cancel
Save