Skip to content

Commit b9c17a6

Browse files
committed
Answer canceled requests
1 parent 5004cb9 commit b9c17a6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

crates/ra_lsp_server/src/main_loop.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,14 @@ fn on_notification(
318318
panic!("string id's not supported: {:?}", id);
319319
}
320320
};
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+
}
322329
return Ok(());
323330
}
324331
Err(not) => not,

0 commit comments

Comments
 (0)