fix: eth: remove subscriptions when network error recieved from subscriber

This commit is contained in:
dr-frmr 2024-03-20 12:47:29 -06:00
parent 6f156926fa
commit 235f7587e0
No known key found for this signature in database

View File

@ -251,7 +251,7 @@ async fn handle_network_error(
// if we hold active subscriptions for the remote node that this error refers to,
// close them here -- they will need to resubscribe
// TODO is this necessary?
if let Some(sub_map) = active_subscriptions.get(&wrapped_error.error.target) {
if let Some((_who, sub_map)) = active_subscriptions.remove(&wrapped_error.error.target) {
for (_sub_id, sub) in sub_map.iter() {
if let ActiveSub::Local(handle) = sub {
verbose_print(