1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-28 21:25:25 +00:00

Add connection type to websocket query parameters

This allows external services to distinguish between them.
This commit is contained in:
Asher 2020-03-05 15:48:26 -06:00
parent c7e6e58387
commit 0b9a478289
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
3 changed files with 15 additions and 1 deletions

View File

@ -442,6 +442,19 @@ index d0f6e6b18a..1966fd297d 100644
-
-
-
diff --git a/src/vs/platform/remote/common/remoteAgentConnection.ts b/src/vs/platform/remote/common/remoteAgentConnection.ts
index eab8591492..26668701f7 100644
--- a/src/vs/platform/remote/common/remoteAgentConnection.ts
+++ b/src/vs/platform/remote/common/remoteAgentConnection.ts
@@ -88,7 +88,7 @@ async function connectToRemoteExtensionHostAgent(options: ISimpleConnectionOptio
options.socketFactory.connect(
options.host,
options.port,
- `reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`,
+ `type=${connectionTypeToString(connectionType)}&reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`,
(err: any, socket: ISocket | undefined) => {
if (err || !socket) {
options.logService.error(`${logPrefix} socketFactory.connect() failed. Error:`);
diff --git a/src/vs/server/browser/client.ts b/src/vs/server/browser/client.ts
new file mode 100644
index 0000000000..95e70869f2

View File

@ -1,7 +1,7 @@
{
"name": "code-server",
"license": "MIT",
"version": "3.0.0",
"version": "3.0.1",
"scripts": {
"clean": "ci/clean.sh",
"vscode": "ci/vscode.sh",

View File

@ -53,6 +53,7 @@ Our changes include:
- Make extensions work in the browser.
- Fix getting permanently disconnected when you sleep or hibernate for a while.
- Make it possible to automatically update the binary.
- Add connection type to web socket query parameters.
## Future