Skip to content

Commit af0004d

Browse files
Handle broadcasts to zero clients
Fixes miguelgrinberg#88
1 parent 0f0d635 commit af0004d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

socketio/asyncio_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ async def emit(self, event, data, namespace, room=None, skip_sid=None,
2323
id = None
2424
tasks.append(self.server._emit_internal(sid, event, data,
2525
namespace, id))
26-
await asyncio.wait(tasks)
26+
if tasks != []:
27+
await asyncio.wait(tasks)
2728

2829
async def close_room(self, room, namespace):
2930
"""Remove all participants from a room.

0 commit comments

Comments
 (0)