aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVeetaha <[email protected]>2020-08-09 22:41:48 +0100
committerVeetaha <[email protected]>2020-08-09 22:49:53 +0100
commitdbe7ede2eebc1301a40f0e1a3a408e11a86a0e84 (patch)
tree57d429b52959d9f7bf6d8231421da2460aae93f8
parente43811c1645f78818d5d7fe0054b54a462145847 (diff)
Let shutdown request to pass through when status == Loading
-rw-r--r--crates/rust-analyzer/src/main_loop.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index d69f7941d..eb7c96933 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -337,7 +337,7 @@ impl GlobalState {
337 fn on_request(&mut self, request_received: Instant, req: Request) -> Result<()> { 337 fn on_request(&mut self, request_received: Instant, req: Request) -> Result<()> {
338 self.register_request(&req, request_received); 338 self.register_request(&req, request_received);
339 339
340 if self.status == Status::Loading { 340 if self.status == Status::Loading && req.method != "shutdown" {
341 self.respond(lsp_server::Response::new_err( 341 self.respond(lsp_server::Response::new_err(
342 req.id, 342 req.id,
343 // FIXME: i32 should impl From<ErrorCode> (from() guarantees lossless conversion) 343 // FIXME: i32 should impl From<ErrorCode> (from() guarantees lossless conversion)