From 07444976998122ca81dec7cca1f761c5b8b84f79 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Fri, 24 Apr 2020 00:06:01 +0800 Subject: Panic proc macro srv if read request failed --- crates/ra_proc_macro_srv/src/cli.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/ra_proc_macro_srv/src/cli.rs b/crates/ra_proc_macro_srv/src/cli.rs index 5f1f3ba3c..7bfa4312a 100644 --- a/crates/ra_proc_macro_srv/src/cli.rs +++ b/crates/ra_proc_macro_srv/src/cli.rs @@ -8,8 +8,9 @@ pub fn run() { loop { let req = match read_request() { Err(err) => { - eprintln!("Read message error on ra_proc_macro_srv: {}", err); - continue; + // Panic here, as the stdin pipe may be closed. + // Otherwise, client will be restart the service anyway. + panic!("Read message error on ra_proc_macro_srv: {}", err); } Ok(None) => continue, Ok(Some(req)) => req, -- cgit v1.2.3