From 1fb7a76575426dd58a5e9c0e01646302ccc96188 Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Sat, 29 Jan 2022 12:10:04 +0000 Subject: [PATCH] Connect with an empty auth object instead of None (Fixes #861) --- src/socketio/asyncio_client.py | 2 +- src/socketio/client.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/socketio/asyncio_client.py b/src/socketio/asyncio_client.py index 03b770d..db02526 100644 --- a/src/socketio/asyncio_client.py +++ b/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)) diff --git a/src/socketio/client.py b/src/socketio/client.py index 5046ea8..58d381b 100644 --- a/src/socketio/client.py +++ b/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))