File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -120,11 +120,6 @@ export class ConnectionManager implements IConnectionManager {
120120 public stop ( ) {
121121 this . logger . debug ( 'Stopping...' )
122122
123- if ( this . connectionStatus === ConnectionStatus . Failed ) {
124- this . languageServerClient = undefined ;
125- this . languageServerProcess = undefined ;
126- }
127-
128123 this . connectionStatus = ConnectionStatus . Stopping ;
129124
130125 // Close the language server client
@@ -133,14 +128,11 @@ export class ConnectionManager implements IConnectionManager {
133128 this . languageServerClient = undefined ;
134129 }
135130
136- // Kill the language server process we spawned
137- if ( this . languageServerProcess !== undefined ) {
138- // Terminate Language Server process
139- // TODO: May not be functional on Windows.
140- // Perhaps send the exit command and wait for process to exit?
141- this . languageServerProcess . kill ( ) ;
142- this . languageServerProcess = undefined ;
143- }
131+ // The language server process we spawn will close once the
132+ // client disconnects. No need to forcibly kill the process here. Also the language
133+ // client will try and send a shutdown event, which will throw errors if the language
134+ // client can no longer transmit the message.
135+ this . languageServerProcess = undefined ;
144136
145137 this . connectionStatus = ConnectionStatus . NotStarted ;
146138
You can’t perform that action at this time.
0 commit comments