Skip to content

Commit 0b9a478

Browse files
committed
Add connection type to websocket query parameters
This allows external services to distinguish between them.
1 parent c7e6e58 commit 0b9a478

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

ci/vscode.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,19 @@ index d0f6e6b18a..1966fd297d 100644
442442
-
443443
-
444444
-
445+
diff --git a/src/vs/platform/remote/common/remoteAgentConnection.ts b/src/vs/platform/remote/common/remoteAgentConnection.ts
446+
index eab8591492..26668701f7 100644
447+
--- a/src/vs/platform/remote/common/remoteAgentConnection.ts
448+
+++ b/src/vs/platform/remote/common/remoteAgentConnection.ts
449+
@@ -88,7 +88,7 @@ async function connectToRemoteExtensionHostAgent(options: ISimpleConnectionOptio
450+
options.socketFactory.connect(
451+
options.host,
452+
options.port,
453+
- `reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`,
454+
+ `type=${connectionTypeToString(connectionType)}&reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`,
455+
(err: any, socket: ISocket | undefined) => {
456+
if (err || !socket) {
457+
options.logService.error(`${logPrefix} socketFactory.connect() failed. Error:`);
445458
diff --git a/src/vs/server/browser/client.ts b/src/vs/server/browser/client.ts
446459
new file mode 100644
447460
index 0000000000..95e70869f2

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "code-server",
33
"license": "MIT",
4-
"version": "3.0.0",
4+
"version": "3.0.1",
55
"scripts": {
66
"clean": "ci/clean.sh",
77
"vscode": "ci/vscode.sh",

src/node/app/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Our changes include:
5353
- Make extensions work in the browser.
5454
- Fix getting permanently disconnected when you sleep or hibernate for a while.
5555
- Make it possible to automatically update the binary.
56+
- Add connection type to web socket query parameters.
5657

5758
## Future
5859

0 commit comments

Comments
 (0)