MCPcopy Index your code
hub / github.com/microsoft/vscode-languageserver-node / closed

Method closed

client/src/client.ts:288–302  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

286 return ErrorAction.Shutdown;
287 }
288 public closed(): CloseAction {
289 this.restarts.push(Date.now());
290 if (this.restarts.length < 5) {
291 return CloseAction.Restart;
292 } else {
293 let diff = this.restarts[this.restarts.length - 1] - this.restarts[0];
294 if (diff <= 3 * 60 * 1000) {
295 Window.showErrorMessage(`The ${this.name} server crashed 5 times in the last 3 minutes. The server will not be restarted.`);
296 return CloseAction.DoNotRestart;
297 } else {
298 this.restarts.shift();
299 return CloseAction.Restart;
300 }
301 }
302 }
303}
304
305export interface InitializationFailedHandler {

Callers

nothing calls this directly

Calls 2

shiftMethod · 0.80
showErrorMessageMethod · 0.65

Tested by

no test coverage detected