Skip to content

Commit

Permalink
actually fix asgi scope
Browse files Browse the repository at this point in the history
Signed-off-by: Teo Koon Peng <teokoonpeng@gmail.com>
  • Loading branch information
koonpeng committed Jul 19, 2024
1 parent 27e880c commit ed0093d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/api-server/api_server/fast_io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def _match_routes(
return None

async def _on_connect(self, sid: str, environ: dict, auth: dict | None = None):
logger = get_logger(HTTPConnection(environ["asgi"]))
logger = get_logger(HTTPConnection(environ["asgi.scope"]))
user = (
await self._socketio_connect(sid, environ, auth)
if self._socketio_connect
Expand Down
2 changes: 1 addition & 1 deletion packages/api-server/api_server/test/test_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ async def handle_resp(emit_room, msg, *_args, **_kwargs):
portal.call(
on_sio_connect,
"test",
{"asgi": mock_scope},
{"asgi.scope": mock_scope},
{"token": self.client.token(user)},
)
connected = True
Expand Down

0 comments on commit ed0093d

Please sign in to comment.