fix(provider::ws): ignore the websocket response when the request has been cancelled. (#641)
This commit is contained in:
parent
9fc75ef245
commit
8d07610e4a
|
@ -313,9 +313,11 @@ where
|
|||
Err(_) => {}
|
||||
Ok(Incoming::Response(resp)) => {
|
||||
if let Some(request) = self.pending.remove(&resp.id) {
|
||||
if !request.is_canceled() {
|
||||
request.send(resp.data.into_result()).map_err(to_client_error)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(Incoming::Notification(notification)) => {
|
||||
let id = notification.params.subscription;
|
||||
if let Entry::Occupied(stream) = self.subscriptions.entry(id) {
|
||||
|
|
Loading…
Reference in New Issue