diff --git a/socketio/server.py b/socketio/server.py index ace4a5d..32b4e79 100644 --- a/socketio/server.py +++ b/socketio/server.py @@ -355,8 +355,8 @@ class Server(object): namespace_list = [namespace] for n in namespace_list: if n != '/' and self.manager.is_connected(sid, n): - self._trigger_event('disconnect', n, sid) self.manager.disconnect(sid, n) + self._trigger_event('disconnect', n, sid) if namespace == '/' and self.manager.is_connected(sid, namespace): self._trigger_event('disconnect', '/', sid) self.manager.disconnect(sid, '/')