Check for correct usable data in client registration
This commit is contained in:
parent
93cf92e0cf
commit
8107791dab
1 changed files with 1 additions and 1 deletions
|
@ -1447,7 +1447,7 @@ class Server:
|
|||
:return: True, if the room exist, False otherwise
|
||||
:rtype: bool
|
||||
"""
|
||||
if data["room"] in self.clients:
|
||||
if "room" in data and data["room"] in self.clients:
|
||||
async with self.sio.session(sid) as session:
|
||||
session["room"] = data["room"]
|
||||
await self.sio.enter_room(sid, session["room"])
|
||||
|
|
Loading…
Add table
Reference in a new issue