Skip to content

Commit

Permalink
clear outdated entries before sending response
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Feb 26, 2024
1 parent 9de616c commit 8200379
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mm2src/coins/eth/web3_transport/websocket_transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ impl WebsocketTransport {
}

if let Some(id) = inc_event.get("id") {
// just to ensure we don't have outdated entries
response_notifiers.clear_expired_entries();

let request_id = id.as_u64().unwrap_or_default() as usize;

if let Some(notifier) = response_notifiers.remove(&request_id) {
Expand Down

0 comments on commit 8200379

Please sign in to comment.