aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp
diff options
context:
space:
mode:
Diffstat (limited to 'helix-lsp')
-rw-r--r--helix-lsp/src/lib.rs6
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))
}