Skip to content

Commit

Permalink
Handle broadcasts to zero clients
Browse files Browse the repository at this point in the history
Fixes #88
  • Loading branch information
miguelgrinberg committed Mar 28, 2017
1 parent 0f0d635 commit af0004d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion socketio/asyncio_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ async def emit(self, event, data, namespace, room=None, skip_sid=None,
id = None
tasks.append(self.server._emit_internal(sid, event, data,
namespace, id))
await asyncio.wait(tasks)
if tasks != []:
await asyncio.wait(tasks)

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

0 comments on commit af0004d

Please sign in to comment.