From c732f215cb31e9f022090b8d0212f6ea9c134c11 Mon Sep 17 00:00:00 2001 From: Emil Lauridsen Date: Fri, 27 Dec 2019 12:43:14 +0100 Subject: Don't finish main cargo watch thread when subprocess finishes. --- crates/ra_lsp_server/src/main_loop.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crates/ra_lsp_server/src/main_loop.rs') diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs index e66b8f9eb..af1a487de 100644 --- a/crates/ra_lsp_server/src/main_loop.rs +++ b/crates/ra_lsp_server/src/main_loop.rs @@ -184,7 +184,10 @@ pub fn main_loop( Err(RecvError) => Err("vfs died")?, }, recv(libdata_receiver) -> data => Event::Lib(data.unwrap()), - recv(world_state.check_watcher.task_recv) -> task => Event::CheckWatcher(task.unwrap()) + recv(world_state.check_watcher.task_recv) -> task => match task { + Ok(task) => Event::CheckWatcher(task), + Err(RecvError) => Err("check watcher died")?, + } }; if let Event::Msg(Message::Request(req)) = &event { if connection.handle_shutdown(&req)? { -- cgit v1.2.3