Skip to content

Commit 2f215a3

Browse files
committed
fix issue
1 parent 2825500 commit 2f215a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

reflex/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ async def on_connect(self, sid, environ):
15381538
environ: The request information, including HTTP headers.
15391539
"""
15401540
query_params = urllib.parse.parse_qs(environ.get("QUERY_STRING"))
1541-
await self.link_token_to_sid(sid, query_params.get("token"))
1541+
await self.link_token_to_sid(sid, query_params.get("token", [])[0])
15421542

15431543
def on_disconnect(self, sid):
15441544
"""Event for when the websocket disconnects.
@@ -1611,7 +1611,7 @@ async def on_ping(self, sid):
16111611
# Emit the test event.
16121612
await self.emit(str(constants.SocketEvent.PING), "pong", to=sid)
16131613

1614-
async def link_token_to_sid(self, sid, token):
1614+
async def link_token_to_sid(self, sid: str, token: str):
16151615
"""Link a token to a session id.
16161616
16171617
Args:

0 commit comments

Comments
 (0)