mirror of
https://github.com/coder/code-server.git
synced 2024-12-05 07:13:06 +08:00
a1af9e2a56
* Move integration types into code-server This will be easier to maintain than to have it as a patch. * Disable connection token Using a flag means we will not need to patch it out. I think this is new from 1.64? * Add product.json to build process This way we do not have to patch it. * Ship with remote agent package.json Instead of the root one. This contains fewer dependencies. * Let Code handle errors This way we will not have to patch Code to make this work and I think it makes sense to let Code handle the request. If we do want to handle errors we can do it cleanly by patching their error handler to throw instead. * Move manifest override into code-server This way we will not have to patch it. * Move to patches - Switch submodule to track upstream - Add quilt to the process - Add patches The node-* ignore was ignoring one of the diffs so I removed it. This was added when we were curling Node as node-v{version}-darwin-x64 for the macOS build but this no longer happens (we use the Node action to install a specific version now so we just use the system-wide Node). * Use pre-packaged Code
20 lines
1.5 KiB
Diff
20 lines
1.5 KiB
Diff
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.
|
|
|
|
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
|
|
@@ -231,7 +231,7 @@ async function connectToRemoteExtensionH
|
|
|
|
let socket: ISocket;
|
|
try {
|
|
- socket = await createSocket(options.logService, options.socketFactory, options.host, options.port, `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, `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);
|