Stop crash when the first participant joins a room
This commit is contained in:
parent
f1d23e78a7
commit
bebc6d4b95
|
@ -115,8 +115,11 @@ def handle_join_negotiation(json):
|
|||
def get_room_participants(room):
|
||||
if '/' not in socketio.server.manager.get_namespaces():
|
||||
return []
|
||||
try:
|
||||
sessions = [s for s in socketio.server.manager.get_participants('/', room)]
|
||||
participants = [p for s,p in session_map.items() if s in sessions]
|
||||
except:
|
||||
return []
|
||||
app.logger.debug(participants)
|
||||
return participants
|
||||
|
||||
|
|
Loading…
Reference in New Issue