Browse Source

Fix Python 3.11 deprecation warning (#941)

pull/948/head
Jérôme Boulmier 3 years ago
committed by GitHub
parent
commit
4b697815c3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/socketio/asyncio_manager.py

5
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)

Loading…
Cancel
Save