You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix stalling issue if subscription.next() is stuck (#1119)
* Fix stalling issue if subscription.next() is stuck
1. Replaced tokio::select! with tokio::time::timeout that
directly wraps subscription.next()
2. Simplified the timeout logic - now it's a
straightforward 60-second timeout on each subscription
call
3. Fixed the stalling issue - the timeout will always
fire after 60 seconds, even if subscription.next() is
stuck
The key improvement is that the timeout now wraps the
potentially hanging operation directly, guaranteeing
detection of a stalled subscription. This eliminates the
future starvation issue that could prevent the original
timeout from firing.
* Fix potential stalling in the runtime_upgrade_task
* Add periodic health checks to runtime upgrade subscription
Added RPC health checks every hour to detect hung connections without
the need to recreate the updater subscription every hour.
* Fix fmt
log::warn!(target:LOG_TARGET,"No blocks received for {} seconds - subscription may be stalled, recreating subscription...",BLOCK_SUBSCRIPTION_TIMEOUT_SECS);
0 commit comments