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