Browse Source

Connect with an empty auth object instead of None (Fixes #861)

pull/862/head
Miguel Grinberg 3 years ago
parent
commit
1fb7a76575
No known key found for this signature in database GPG Key ID: 36848B262DF5F06C
  1. 2
      src/socketio/asyncio_client.py
  2. 2
      src/socketio/client.py

2
src/socketio/asyncio_client.py

@ -497,7 +497,7 @@ class AsyncClient(client.Client):
"""Handle the Engine.IO connection event."""
self.logger.info('Engine.IO connection established')
self.sid = self.eio.sid
real_auth = await self._get_real_value(self.connection_auth)
real_auth = await self._get_real_value(self.connection_auth) or {}
for n in self.connection_namespaces:
await self._send_packet(self.packet_class(
packet.CONNECT, data=real_auth, namespace=n))

2
src/socketio/client.py

@ -680,7 +680,7 @@ class Client(object):
"""Handle the Engine.IO connection event."""
self.logger.info('Engine.IO connection established')
self.sid = self.eio.sid
real_auth = self._get_real_value(self.connection_auth)
real_auth = self._get_real_value(self.connection_auth) or {}
for n in self.connection_namespaces:
self._send_packet(self.packet_class(
packet.CONNECT, data=real_auth, namespace=n))

Loading…
Cancel
Save