Skip to content

Commit 4be57a9

Browse files
authored
Merge pull request #4 from /issues/1
WORKAROUND: #1
2 parents d676f59 + 996fe81 commit 4be57a9

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

server/SampleServer/App.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using System;
99
using System.Collections.Generic;
1010
using System.IO;
11+
using System.Threading.Tasks;
1112

1213
namespace SampleServer
1314
{
@@ -145,5 +146,13 @@ protected override Result<CompletionItem, ResponseError> ResolveCompletionItem(C
145146
}
146147
return Result<CompletionItem, ResponseError>.Success(@params);
147148
}
149+
150+
protected override VoidResult<ResponseError> Shutdown()
151+
{
152+
Logger.Instance.Log("Language Server is about to shutdown.");
153+
// WORKAROUND: Language Server does not receive an exit notification.
154+
Task.Delay(1000).ContinueWith(_ => Environment.Exit(0));
155+
return VoidResult<ResponseError>.Success();
156+
}
148157
}
149158
}

0 commit comments

Comments
 (0)