From b49b1796e9b1b950f422dd2176bc85f93068b0fe Mon Sep 17 00:00:00 2001 From: Asher Date: Fri, 14 May 2021 15:05:05 -0500 Subject: [PATCH] Add socket type to websocket connection query (#3391) This was added a long time ago but accidentally lost when we reverted the retry changes to this file after one of the VS Code updates that added their own retry (we reverted everything not realizing we had other unrelated changes in here). --- .../src/vs/platform/remote/common/remoteAgentConnection.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts b/lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts index 41475982d..e36cc6be5 100644 --- a/lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts +++ b/lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts @@ -229,7 +229,9 @@ async function connectToRemoteExtensionHostAgent(options: ISimpleConnectionOptio let socket: ISocket; try { - socket = await createSocket(options.logService, options.socketFactory, options.host, options.port, `reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`, timeoutCancellationToken); + // NOTE@coder: Add connection type to the socket. This is so they can be + // distinguished by the backend. + socket = await createSocket(options.logService, options.socketFactory, options.host, options.port, `type=${connectionTypeToString(connectionType)}&reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`, timeoutCancellationToken); } catch (error) { options.logService.error(`${logPrefix} socketFactory.connect() failed or timed out. Error:`); options.logService.error(error);