mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +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);
|
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(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
Err(not) => not,
|
Err(not) => not,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue