diff options
author | Alexis Kalabura | 2022-10-03 14:54:46 +0000 |
---|---|---|
committer | GitHub | 2022-10-03 14:54:46 +0000 |
commit | b9ff5d0e0a8a0cc17082dede2f662eb35c7a5815 (patch) | |
tree | 4ff4ff626ccc068e9400683343676def45aac9dc /helix-lsp | |
parent | c144cc0b04c18d6749016773073a23b5e42d5804 (diff) |
[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
Diffstat (limited to 'helix-lsp')
-rw-r--r-- | helix-lsp/src/lib.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs index 0717fc04..98300a62 100644 --- a/helix-lsp/src/lib.rs +++ b/helix-lsp/src/lib.rs @@ -370,7 +370,11 @@ impl Registry { let NewClientResult(client, incoming) = start_client(id, language_config, config)?; 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)) } |