diff --git a/src/socketio/asyncio_manager.py b/src/socketio/asyncio_manager.py index f89022c..4a014e7 100644 --- a/src/socketio/asyncio_manager.py +++ b/src/socketio/asyncio_manager.py @@ -26,8 +26,9 @@ class AsyncManager(BaseManager): id = self._generate_ack_id(sid, callback) else: id = None - tasks.append(self.server._emit_internal(eio_sid, event, data, - namespace, id)) + tasks.append(asyncio.create_task( + self.server._emit_internal(eio_sid, event, data, + namespace, id))) if tasks == []: # pragma: no cover return await asyncio.wait(tasks)