Skip to content

Commit

Permalink
Force legacy ws subprotocol when using gateway
Browse files Browse the repository at this point in the history
Currently, ws subprotocols should be the same for notebook client and
gateway since there is no serializer/deserializer between the 2 streams
if subprotocols differ.
  • Loading branch information
Emmanuel Pignot committed Aug 9, 2023
1 parent c5dc0f6 commit ace55f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jupyter_server/gateway/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ class GatewayWebSocketConnection(BaseKernelWebsocketConnection):

retry = Int(0)

# When opening ws connection to gateway, server already negotiated subprotocol with notebook client.
# Same protocol must be used for client and gateway, so legacy ws subprotocol for client is enforced here.
kernel_ws_protocol = ""

async def connect(self):
"""Connect to the socket."""
# websocket is initialized before connection
Expand Down

0 comments on commit ace55f5

Please sign in to comment.