Skip to content

Commit ace55f5

Browse files
author
Emmanuel Pignot
committed
Force legacy ws subprotocol when using gateway
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.
1 parent c5dc0f6 commit ace55f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jupyter_server/gateway/connections.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ class GatewayWebSocketConnection(BaseKernelWebsocketConnection):
3030

3131
retry = Int(0)
3232

33+
# When opening ws connection to gateway, server already negotiated subprotocol with notebook client.
34+
# Same protocol must be used for client and gateway, so legacy ws subprotocol for client is enforced here.
35+
kernel_ws_protocol = ""
36+
3337
async def connect(self):
3438
"""Connect to the socket."""
3539
# websocket is initialized before connection

0 commit comments

Comments
 (0)