Archived
1
0

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:
Asher
2019-09-13 10:48:04 -05:00
parent 48a97abe1d
commit 1bd5eca73d
3 changed files with 35 additions and 44 deletions

View File

@ -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