From 12f28f6276bbf1d1a19a553c7352bcb974361247 Mon Sep 17 00:00:00 2001 From: Roberto Vidal Date: Mon, 15 Apr 2019 21:41:27 +0200 Subject: Adds "restart server" command --- crates/gen_lsp_server/src/stdio.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'crates/gen_lsp_server/src/stdio.rs') diff --git a/crates/gen_lsp_server/src/stdio.rs b/crates/gen_lsp_server/src/stdio.rs index dab2d8da8..c5fe5b83a 100644 --- a/crates/gen_lsp_server/src/stdio.rs +++ b/crates/gen_lsp_server/src/stdio.rs @@ -37,11 +37,9 @@ pub struct Threads { } impl Threads { - pub fn join(self) -> Result<()> { - match self.reader.join() { - Ok(r) => r?, - Err(_) => bail!("reader panicked"), - } + pub fn exit(self) -> Result<()> { + // We can't rely on stdin being closed + drop(self.reader); match self.writer.join() { Ok(r) => r, Err(_) => bail!("writer panicked"), -- cgit v1.2.3