Skip to content

Commit c9e23cc

Browse files
committed
fix fastapi websocket
1 parent 3427cdb commit c9e23cc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

dash/backends/_fastapi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ async def _handle_error(
188188

189189
async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
190190
# Handle lifespan events (startup/shutdown)
191+
191192
if scope["type"] == "lifespan":
192193
try:
193194
dash_app = get_app()
@@ -199,7 +200,7 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
199200
return
200201

201202
# Non-HTTP/WebSocket scopes pass through
202-
if scope["type"] not in ("http", "websocket"):
203+
if scope["type"] != "http":
203204
await self.app(scope, receive, send)
204205
return
205206

0 commit comments

Comments
 (0)