From d34f49b3b19c39f0beaed9d0e762f070b71f7104 Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Sat, 5 Mar 2016 23:13:12 -0800 Subject: [PATCH] remove disconnected client before invoking disconnect handler --- socketio/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, '/')