diff options
author | Aleksey Kladov <[email protected]> | 2018-12-09 11:43:02 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-12-09 11:43:02 +0000 |
commit | b9c17a6001aaf79e181a86218883fe96d9c95c09 (patch) | |
tree | 107816fd48f071280e4837b0b3c5e832a182b095 /crates/ra_lsp_server | |
parent | 5004cb928b2c430a6d7fba59d89f7829982d8baa (diff) |
Answer canceled requests
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs index a01eeff88..41f70f263 100644 --- a/crates/ra_lsp_server/src/main_loop.rs +++ b/crates/ra_lsp_server/src/main_loop.rs | |||
@@ -318,7 +318,14 @@ fn on_notification( | |||
318 | panic!("string id's not supported: {:?}", id); | 318 | panic!("string id's not supported: {:?}", id); |
319 | } | 319 | } |
320 | }; | 320 | }; |
321 | pending_requests.remove(&id); | 321 | if pending_requests.remove(&id) { |
322 | let response = RawResponse::err( | ||
323 | id, | ||
324 | ErrorCode::RequestCancelled as i32, | ||
325 | "canceled by client".to_string(), | ||
326 | ); | ||
327 | msg_sender.send(RawMessage::Response(response)) | ||
328 | } | ||
322 | return Ok(()); | 329 | return Ok(()); |
323 | } | 330 | } |
324 | Err(not) => not, | 331 | Err(not) => not, |