File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
src/EditorFeatures/Core/LanguageServer Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,6 @@ private void Load()
73
73
74
74
async Task LoadAsync ( )
75
75
{
76
-
77
76
// Explicitly switch to the bg so that if this causes any expensive work (like mef loads) it
78
77
// doesn't block the UI thread. Note, we always yield because sometimes our caller starts
79
78
// on the threadpool thread but is indirectly blocked on by the UI thread.
@@ -90,13 +89,10 @@ await _languageClientBroker.Value.LoadAsync(new LanguageClientMetadata(
90
89
91
90
private void Unload ( )
92
91
{
93
- using var token = _asynchronousOperationListener . BeginAsyncOperation ( nameof ( Unload ) ) ;
94
- UnloadAsync ( ) . ReportNonFatalErrorAsync ( ) . CompletesAsyncOperation ( token ) ;
95
-
96
- async Task UnloadAsync ( )
97
- {
98
- await _languageClient . StopServerAsync ( ) . ConfigureAwait ( false ) ;
99
- }
92
+ // We just want to signal that an unload should happen, in case the above call to Load comes in quick.
93
+ // We don't want to wait for it to complete, not do we care about errors that may occur during the unload.
94
+ // The language client/server does its own error reporting as necessary.
95
+ _languageClient . StopServerAsync ( ) . Forget ( ) ;
100
96
}
101
97
102
98
/// <summary>
You can’t perform that action at this time.
0 commit comments