Skip to content

Commit 39193a5

Browse files
committed
Only wait for rich client to reconnect
1 parent 6e127c9 commit 39193a5

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,21 @@ function _createExtHostProtocol(): Promise<IMessagePassingProtocol> {
131131
protocol.onClose(() => onTerminate());
132132
resolve(protocol);
133133

134-
protocol.onSocketClose(() => {
135-
// The socket has closed, let's give the renderer a certain amount of time to reconnect
136-
disconnectWaitTimer = setTimeout(() => {
137-
disconnectWaitTimer = null;
134+
if (msg.skipWebSocketFrames) {
135+
// Wait for rich client to reconnect
136+
protocol.onSocketClose(() => {
137+
// The socket has closed, let's give the renderer a certain amount of time to reconnect
138+
disconnectWaitTimer = setTimeout(() => {
139+
disconnectWaitTimer = null;
140+
onTerminate();
141+
}, ProtocolConstants.ReconnectionGraceTime);
142+
});
143+
} else {
144+
// Do not wait for web companion to reconnect
145+
protocol.onSocketClose(() => {
138146
onTerminate();
139-
}, ProtocolConstants.ReconnectionGraceTime);
140-
});
147+
});
148+
}
141149
}
142150
}
143151
});

0 commit comments

Comments
 (0)