fix(ethstats): handle canonical stream termination correctly (#22680)

This commit is contained in:
pepes
2026-03-01 10:42:57 +01:00
committed by GitHub
parent 79e52ad2e0
commit 5356c0480e

View File

@@ -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;
}
}