From 35a18197e022c18a4b27697de712999f35ad3717 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Thu, 28 Apr 2022 16:50:27 -0700 Subject: [PATCH] docs(patches): add notes for testing connection-type --- patches/connection-type.diff | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/patches/connection-type.diff b/patches/connection-type.diff index 9f04bc299..2011a7862 100644 --- a/patches/connection-type.diff +++ b/patches/connection-type.diff @@ -4,12 +4,18 @@ This allows the backend to distinguish them. In our case we use them to count a single "open" of Code so we need to be able to distinguish between web sockets from two instances and two web sockets used in a single instance. +To test this, +1. Run code-server +2. Open Network tab in Browser DevTools and look for websocket requests +3. You should see the connection type in the request url + + Index: code-server/lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts +++ code-server/lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts @@ -231,7 +231,7 @@ async function connectToRemoteExtensionH - + let socket: ISocket; try { - socket = await createSocket(options.logService, options.socketFactory, options.host, options.port, `reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`, `renderer-${connectionTypeToString(connectionType)}-${options.reconnectionToken}`, timeoutCancellationToken);