From ea1a52ac84cf2cd3d5cb6d1c0f6a64932159d835 Mon Sep 17 00:00:00 2001 From: Hanzawa Ye Date: Mon, 11 Jul 2016 11:26:42 +0800 Subject: [PATCH] fix the order of triggered disconnect event --- socketio/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/socketio/server.py b/socketio/server.py index 77f4d66..eceb3a4 100644 --- a/socketio/server.py +++ b/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, '/')