[lsp-restart]: call the force_shutdown method for the old_client (#3972)

* [lsp-restart]: call the shutdown_and_exit method for the old_client

* change shutdown_and_exit to force_shutdown

* remove extra log
pull/4085/head
Alexis Kalabura 2 years ago committed by GitHub
parent c144cc0b04
commit b9ff5d0e0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -370,7 +370,11 @@ impl Registry {
let NewClientResult(client, incoming) = start_client(id, language_config, config)?; let NewClientResult(client, incoming) = start_client(id, language_config, config)?;
self.incoming.push(UnboundedReceiverStream::new(incoming)); self.incoming.push(UnboundedReceiverStream::new(incoming));
entry.insert((id, client.clone())); let (_, old_client) = entry.insert((id, client.clone()));
tokio::spawn(async move {
let _ = old_client.force_shutdown().await;
});
Ok(Some(client)) Ok(Some(client))
} }

Loading…
Cancel
Save