mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
fix(ethstats): handle canonical stream termination correctly (#22680)
This commit is contained in:
@@ -648,11 +648,8 @@ where
|
||||
let shutdown_tx = shutdown_tx.clone();
|
||||
|
||||
tokio::spawn(async move {
|
||||
loop {
|
||||
let head = canonical_stream.next().await;
|
||||
if let Some(head) = head &&
|
||||
head_tx.send(head).await.is_err()
|
||||
{
|
||||
while let Some(head) = canonical_stream.next().await {
|
||||
if head_tx.send(head).await.is_err() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user