Fix proxy hang due to held lock

This commit is contained in:
MinusGix 2022-09-26 01:38:43 -05:00
parent 3d77ed45d5
commit 8368851e2f
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}
}