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):
|
def get_room_participants(room):
|
||||||
if '/' not in socketio.server.manager.get_namespaces():
|
if '/' not in socketio.server.manager.get_namespaces():
|
||||||
return []
|
return []
|
||||||
sessions = [s for s in socketio.server.manager.get_participants('/', room)]
|
try:
|
||||||
participants = [p for s,p in session_map.items() if s in sessions]
|
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)
|
app.logger.debug(participants)
|
||||||
return participants
|
return participants
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue