aboutsummaryrefslogtreecommitdiff
path: root/crates/gen_lsp_server/src/stdio.rs
diff options
context:
space:
mode:
authorRoberto Vidal <[email protected]>2019-04-15 20:41:27 +0100
committerRoberto Vidal <[email protected]>2019-04-16 21:07:33 +0100
commit12f28f6276bbf1d1a19a553c7352bcb974361247 (patch)
treea3d72ba73e95c80ff24c59d5f546bf8baa0378f5 /crates/gen_lsp_server/src/stdio.rs
parent546d9be2a7bf7b3942c125f922a01321aea6ad26 (diff)
Adds "restart server" command
Diffstat (limited to 'crates/gen_lsp_server/src/stdio.rs')
-rw-r--r--crates/gen_lsp_server/src/stdio.rs8
1 files changed, 3 insertions, 5 deletions
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 {
37} 37}
38 38
39impl Threads { 39impl Threads {
40 pub fn join(self) -> Result<()> { 40 pub fn exit(self) -> Result<()> {
41 match self.reader.join() { 41 // We can't rely on stdin being closed
42 Ok(r) => r?, 42 drop(self.reader);
43 Err(_) => bail!("reader panicked"),
44 }
45 match self.writer.join() { 43 match self.writer.join() {
46 Ok(r) => r, 44 Ok(r) => r,
47 Err(_) => bail!("writer panicked"), 45 Err(_) => bail!("writer panicked"),