Skip to content

Commit 2b62782

Browse files
committed
wip
1 parent 27ea304 commit 2b62782

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

bin/ev-reth/src/main.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ use reth_trie_db::MerklePatriciaTrie;
4343
use serde::{Deserialize, Serialize};
4444
use std::time::Duration;
4545
use tokio::{signal, time::timeout};
46-
use tracing::info;
4746

4847
use crate::{
4948
attributes::{RollkitEnginePayloadAttributes, RollkitEnginePayloadBuilderAttributes},
@@ -394,6 +393,9 @@ fn main() {
394393
tracing::info!("Phase 2 - Waiting for graceful node termination");
395394

396395
// Wait for the node to actually exit with a timeout
396+
// Note: This timeout mechanism relies on the underlying reth node's graceful shutdown.
397+
// If the reth node doesn't respond to dropping the handle, the timeout will always trigger.
398+
// The actual shutdown behavior is controlled by reth's internal shutdown logic.
397399
let shutdown_result = timeout(config.shutdown_timeout, &mut handle.node_exit_future).await;
398400

399401
tracing::info!("Phase 3 - Shutdown sequence completed");
@@ -407,10 +409,7 @@ fn main() {
407409
tracing::error!("Node shutdown timed out after {:?}", config.shutdown_timeout);
408410
tracing::error!("Forcing application exit - this may indicate a shutdown issue");
409411
// Return an error to indicate that shutdown didn't complete gracefully
410-
Err(Box::new(std::io::Error::new(
411-
std::io::ErrorKind::TimedOut,
412-
format!("Graceful shutdown timed out after {}s", config.shutdown_timeout.as_secs())
413-
)) as Box<dyn std::error::Error + Send + Sync>)
412+
Err(eyre::eyre!("Graceful shutdown timed out after {}s", config.shutdown_timeout.as_secs()))
414413
}
415414
}
416415
}

0 commit comments

Comments
 (0)