diff options
Diffstat (limited to 'crates/ra_lsp_server/src')
-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, |