Panic proc macro srv if read request failed

This commit is contained in:
Edwin Cheng
2020-04-24 00:06:01 +08:00
parent 278bf351e3
commit 0744497699

View File

@@ -8,8 +8,9 @@ pub fn run() {
loop { loop {
let req = match read_request() { let req = match read_request() {
Err(err) => { Err(err) => {
eprintln!("Read message error on ra_proc_macro_srv: {}", err); // Panic here, as the stdin pipe may be closed.
continue; // Otherwise, client will be restart the service anyway.
panic!("Read message error on ra_proc_macro_srv: {}", err);
} }
Ok(None) => continue, Ok(None) => continue,
Ok(Some(req)) => req, Ok(Some(req)) => req,