Browse Source
Report which namespaces remain unconnected
pull/962/head
Kristján Valur Jónsson
3 years ago
No known key found for this signature in database
GPG Key ID: BF8D88510B9DE5E8
1 changed files with
5 additions and
2 deletions
-
src/socketio/asyncio_client.py
|
|
@ -158,10 +158,13 @@ class AsyncClient(client.Client): |
|
|
|
break |
|
|
|
except asyncio.TimeoutError: |
|
|
|
pass |
|
|
|
if set(self.namespaces) != set(self.connection_namespaces): |
|
|
|
unconnected = set(self.connection_namespaces) - set(self.namespaces) |
|
|
|
if unconnected: |
|
|
|
await self.disconnect() |
|
|
|
raise exceptions.ConnectionError( |
|
|
|
'One or more namespaces failed to connect') |
|
|
|
'One or more namespaces failed to connect: %r' |
|
|
|
% (list(unconnected),) |
|
|
|
) |
|
|
|
|
|
|
|
self.connected = True |
|
|
|
|
|
|
|