We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68680df commit 4fc7cb1Copy full SHA for 4fc7cb1
src/Client/LanguageClient.cs
@@ -423,7 +423,16 @@ public async Task Shutdown()
423
{
424
if (_connection.IsOpen)
425
426
- await this.RequestShutdown().ConfigureAwait(false);
+ try
427
+ {
428
+ // this can get stuck forever, so use a timeout.
429
+ var cancelSource = new CancellationTokenSource();
430
+ cancelSource.CancelAfter(5 * 1000);
431
+
432
+ await this.RequestShutdown(cancelSource.Token).ConfigureAwait(false);
433
+ }
434
+ catch (TaskCanceledException) { }
435
436
this.SendExit();
437
}
438
0 commit comments