Browse Source
The manager stores the sid<->eio_sid mapping in a reserved room keyed by
None (self.rooms[namespace][None]). Passing None to the public room API —
e.g. leave_room(sid, None) when an app inadvertently does
leave_room(data.get('company_id')) with a missing key — removed the client
from that reserved room, corrupting the internal bookkeeping: is_connected()
started returning False and every subsequent room operation crashed with
KeyError: None, for a client that was still connected.
Reject None at the public entry points (Server/AsyncServer
enter_room/leave_room/close_room) with a clear ValueError, so an invalid
argument can no longer corrupt the manager state. The internal reserved-room
handling in connect()/basic_disconnect() goes through basic_* directly and
is unaffected.
Fixes #1447
pull/1589/head
4 changed files with 44 additions and 0 deletions
Loading…
Reference in new issue