mirror of https://github.com/lapce/lapce.git
Fix proxy hang due to held lock
This commit is contained in:
parent
3d77ed45d5
commit
8368851e2f
|
@ -385,7 +385,8 @@ pub fn handle_response(
|
|||
id: RequestId,
|
||||
result: Result<ProxyResponse, RpcError>,
|
||||
) {
|
||||
if let Some(handler) = self.pending.lock().remove(&id) {
|
||||
let handler = { self.pending.lock().remove(&id) };
|
||||
if let Some(handler) = handler {
|
||||
handler.invoke(result);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue