Browse Source
wait for client to end background tasks on disconnect (#1500)
pull/1501/head
Miguel Grinberg
2 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
2 additions and
2 deletions
-
src/socketio/async_client.py
-
src/socketio/client.py
|
|
@ -407,7 +407,7 @@ class AsyncClient(base_client.BaseClient): |
|
|
|
del self.namespaces[namespace] |
|
|
|
if not self.namespaces: |
|
|
|
self.connected = False |
|
|
|
await self.eio.disconnect(abort=True) |
|
|
|
await self.eio.disconnect() |
|
|
|
|
|
|
|
async def _handle_event(self, namespace, id, data): |
|
|
|
namespace = namespace or '/' |
|
|
|
|
|
@ -387,7 +387,7 @@ class Client(base_client.BaseClient): |
|
|
|
del self.namespaces[namespace] |
|
|
|
if not self.namespaces: |
|
|
|
self.connected = False |
|
|
|
self.eio.disconnect(abort=True) |
|
|
|
self.eio.disconnect() |
|
|
|
|
|
|
|
def _handle_event(self, namespace, id, data): |
|
|
|
namespace = namespace or '/' |
|
|
|