Skip to content

Commit 74e9ab1

Browse files
handle leaving a room and entering again right after (fixes #17)
1 parent dabe33f commit 74e9ab1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

socketio/base_manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def disconnect(self, sid, namespace):
5656

5757
def enter_room(self, sid, namespace, room):
5858
"""Add a client to a room."""
59+
self._clean_rooms() # ensure our rooms are up to date first
5960
if namespace not in self.rooms:
6061
self.rooms[namespace] = {}
6162
if room not in self.rooms[namespace]:

0 commit comments

Comments
 (0)