Skip to content

Commit

Permalink
fix the order of triggered disconnect event
Browse files Browse the repository at this point in the history
  • Loading branch information
sillygod committed Jul 11, 2016
1 parent 3a1ef8a commit ea1a52a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion socketio/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@ def _handle_disconnect(self, sid, namespace):
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, '/')
Expand Down

0 comments on commit ea1a52a

Please sign in to comment.