Skip to content

Commit

Permalink
Connect with an empty auth object instead of None (Fixes #861)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Jan 29, 2022
1 parent b785498 commit 1fb7a76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/socketio/asyncio_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ async def _handle_eio_connect(self):
"""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))
Expand Down
2 changes: 1 addition & 1 deletion src/socketio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ def _handle_eio_connect(self):
"""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))
Expand Down

0 comments on commit 1fb7a76

Please sign in to comment.