Skip to content

Commit

Permalink
[Serve] Ignore cancel request when receving websocket.accept message (r…
Browse files Browse the repository at this point in the history
…ay-project#39413)

From application to client, it is sending `websocket.accept` message.

https://asgi.readthedocs.io/en/latest/specs/www.html#accept-send-event
  • Loading branch information
sihanwang41 committed Sep 8, 2023
1 parent b13fe59 commit 4dcecec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/ray/serve/_private/http_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ async def _consume_and_send_asgi_message_generator(
# field. Other response types (e.g., WebSockets) may not.
status_code = str(asgi_message["status"])
expecting_trailers = asgi_message.get("trailers", False)
elif asgi_message["type"] == "websocket.connect":
elif asgi_message["type"] == "websocket.accept":
is_websocket_connection = True
elif (
asgi_message["type"] == "http.response.body"
Expand Down

0 comments on commit 4dcecec

Please sign in to comment.