From fc9a2db71cf3e70e39a1449f434c8791248b3234 Mon Sep 17 00:00:00 2001 From: Asher Date: Fri, 14 May 2021 14:26:20 -0500 Subject: [PATCH] Add socket type to websocket connection query 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 41475982dd39..e36cc6be5369 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);