mirror of https://github.com/coder/code-server.git
refactor: drop connection-type patch (#5585)
This commit is contained in:
parent
7e98628167
commit
fdec34cf85
|
@ -1,26 +0,0 @@
|
||||||
Add connection type to web sockets
|
|
||||||
|
|
||||||
This allows the backend to distinguish them. In our case we use them to count a
|
|
||||||
single "open" of Code so we need to be able to distinguish between web sockets
|
|
||||||
from two instances and two web sockets used in a single instance.
|
|
||||||
|
|
||||||
To test this,
|
|
||||||
1. Run code-server
|
|
||||||
2. Open Network tab in Browser DevTools and filter for websocket requests
|
|
||||||
3. You should see the `type=<connection-type>` in the request url
|
|
||||||
|
|
||||||
|
|
||||||
Index: code-server/lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts
|
|
||||||
===================================================================
|
|
||||||
--- code-server.orig/lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts
|
|
||||||
+++ code-server/lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts
|
|
||||||
@@ -233,7 +233,8 @@ async function connectToRemoteExtensionH
|
|
||||||
|
|
||||||
let socket: ISocket;
|
|
||||||
try {
|
|
||||||
- socket = await createSocket(options.logService, options.socketFactory, options.host, options.port, getRemoteServerRootPath(options), `reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`, `renderer-${connectionTypeToString(connectionType)}-${options.reconnectionToken}`, timeoutCancellationToken);
|
|
||||||
+
|
|
||||||
+ socket = await createSocket(options.logService, options.socketFactory, options.host, options.port, getRemoteServerRootPath(options), `type=${connectionTypeToString(connectionType)}&reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`, `renderer-${connectionTypeToString(connectionType)}-${options.reconnectionToken}`, timeoutCancellationToken);
|
|
||||||
} catch (error) {
|
|
||||||
options.logService.error(`${logPrefix} socketFactory.connect() failed or timed out. Error:`);
|
|
||||||
options.logService.error(error);
|
|
|
@ -14,7 +14,6 @@ unique-db.diff
|
||||||
log-level.diff
|
log-level.diff
|
||||||
local-storage.diff
|
local-storage.diff
|
||||||
service-worker.diff
|
service-worker.diff
|
||||||
connection-type.diff
|
|
||||||
sourcemaps.diff
|
sourcemaps.diff
|
||||||
disable-downloads.diff
|
disable-downloads.diff
|
||||||
telemetry.diff
|
telemetry.diff
|
||||||
|
|
Loading…
Reference in New Issue