Skip to content

Commit b9ff5d0

Browse files
authored
[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
1 parent c144cc0 commit b9ff5d0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

helix-lsp/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,11 @@ impl Registry {
370370
let NewClientResult(client, incoming) = start_client(id, language_config, config)?;
371371
self.incoming.push(UnboundedReceiverStream::new(incoming));
372372

373-
entry.insert((id, client.clone()));
373+
let (_, old_client) = entry.insert((id, client.clone()));
374+
375+
tokio::spawn(async move {
376+
let _ = old_client.force_shutdown().await;
377+
});
374378

375379
Ok(Some(client))
376380
}

0 commit comments

Comments
 (0)