Fix proxy hang due to held lock
@@ -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);
}
}
