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).
This commit is contained in:
Asher 2021-05-14 15:05:05 -05:00 committed by GitHub
parent 36265ddfaf
commit b49b1796e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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);