Don't terminate extension host on a timeout
We will clean it up on our end if necessary. This allows reconnections after any length of time.
This commit is contained in:
@ -1032,37 +1032,18 @@ index 7c3b6ae53e..18dec6effa 100644
|
||||
|
||||
get webviewResourceRoot(): string {
|
||||
diff --git a/src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts b/src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts
|
||||
index 6d31b177ac..a586ac7466 100644
|
||||
index 6d31b177ac..d7c1705c57 100644
|
||||
--- a/src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts
|
||||
+++ b/src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts
|
||||
@@ -116,7 +116,7 @@ function _createExtHostProtocol(): Promise<IMessagePassingProtocol> {
|
||||
protocol.onClose(() => onTerminate());
|
||||
resolve(protocol);
|
||||
|
||||
- if (msg.skipWebSocketFrames) {
|
||||
+ // if (msg.skipWebSocketFrames) {
|
||||
// Wait for rich client to reconnect
|
||||
@@ -128,7 +128,7 @@ function _createExtHostProtocol(): Promise<IMessagePassingProtocol> {
|
||||
} else {
|
||||
// Do not wait for web companion to reconnect
|
||||
protocol.onSocketClose(() => {
|
||||
// The socket has closed, let's give the renderer a certain amount of time to reconnect
|
||||
@@ -125,12 +125,12 @@ function _createExtHostProtocol(): Promise<IMessagePassingProtocol> {
|
||||
onTerminate();
|
||||
}, ProtocolConstants.ReconnectionGraceTime);
|
||||
});
|
||||
- } else {
|
||||
- // Do not wait for web companion to reconnect
|
||||
- protocol.onSocketClose(() => {
|
||||
- onTerminate();
|
||||
- });
|
||||
- }
|
||||
+ // } else {
|
||||
+ // // Do not wait for web companion to reconnect
|
||||
+ // protocol.onSocketClose(() => {
|
||||
+ // onTerminate();
|
||||
+ // });
|
||||
+ // }
|
||||
+ process.send!('VSCODE_EXTHOST_DISCONNECTED'); // onTerminate();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
diff --git a/src/vs/workbench/workbench.web.main.ts b/src/vs/workbench/workbench.web.main.ts
|
||||
index 681fc606b6..e34ef5d4bc 100644
|
||||
--- a/src/vs/workbench/workbench.web.main.ts
|
||||
|
Reference in New Issue
Block a user