mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 09:27:27 +00:00
Answer canceled requests
This commit is contained in:
parent
5004cb928b
commit
b9c17a6001
1 changed files with 8 additions and 1 deletions
|
@ -318,7 +318,14 @@ fn on_notification(
|
|||
panic!("string id's not supported: {:?}", id);
|
||||
}
|
||||
};
|
||||
pending_requests.remove(&id);
|
||||
if pending_requests.remove(&id) {
|
||||
let response = RawResponse::err(
|
||||
id,
|
||||
ErrorCode::RequestCancelled as i32,
|
||||
"canceled by client".to_string(),
|
||||
);
|
||||
msg_sender.send(RawMessage::Response(response))
|
||||
}
|
||||
return Ok(());
|
||||
}
|
||||
Err(not) => not,
|
||||
|
|
Loading…
Reference in a new issue