From 74e9ab11dcaef919cba198aef6b8124dcfc3007c Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Sat, 5 Mar 2016 22:28:37 -0800 Subject: [PATCH] handle leaving a room and entering again right after (fixes #17) --- socketio/base_manager.py | 1 + 1 file changed, 1 insertion(+) diff --git a/socketio/base_manager.py b/socketio/base_manager.py index e0f35e0..73be015 100644 --- a/socketio/base_manager.py +++ b/socketio/base_manager.py @@ -56,6 +56,7 @@ class BaseManager(object): def enter_room(self, sid, namespace, room): """Add a client to a room.""" + self._clean_rooms() # ensure our rooms are up to date first if namespace not in self.rooms: self.rooms[namespace] = {} if room not in self.rooms[namespace]: