breaking if block listner channel is closed

This commit is contained in:
Godmode Galactus 2023-06-09 10:06:59 +02:00
parent 7db0ef4908
commit 37b4216c05
No known key found for this signature in database
GPG Key ID: A04142C71ABB0DEA
1 changed files with 2 additions and 2 deletions

View File

@ -7,6 +7,7 @@ use std::{
};
use anyhow::bail;
use async_channel::RecvError;
use chrono::{TimeZone, Utc};
use jsonrpsee::SubscriptionSink;
use log::{error, info, trace};
@ -272,8 +273,7 @@ impl BlockListener {
Ok(v) => v,
Err(e) => {
error!("Recv error on block channel {}", e);
tokio::time::sleep(Duration::from_millis(1)).await;
continue;
break;
}
};