diff --git a/chaindata_standalone/src/main.rs b/chaindata_standalone/src/main.rs index dac8482..9042dff 100644 --- a/chaindata_standalone/src/main.rs +++ b/chaindata_standalone/src/main.rs @@ -89,6 +89,10 @@ fn debug_chaindata(chain_data: Arc>, mut exit: broadcast::Rece tokio::spawn(async move { info!("starting debug task"); loop { + if exit.try_recv().is_ok() { + info!("exit signal received - stopping task"); + return; + } let chain_data = chain_data.read().unwrap(); info!("chaindata?"); for account in chain_data.iter_accounts_rooted() { diff --git a/chaindata_standalone/src/router_impl.rs b/chaindata_standalone/src/router_impl.rs index 4c7c0a2..bce84fa 100644 --- a/chaindata_standalone/src/router_impl.rs +++ b/chaindata_standalone/src/router_impl.rs @@ -100,7 +100,6 @@ fn handle_updated_account( let _err = account_update_sender.send((account_write.pubkey, account_write.slot)); } - pub fn spawn_updater_job( chain_data: ChainDataArcRw, mut account_updates: broadcast::Receiver<(Pubkey, u64)>, @@ -165,7 +164,7 @@ pub fn spawn_updater_job( } } - error!("Edge updater job exited.."); + info!("Edge updater job exited.."); // // send this to unblock the code in front of the exit handler // let _ = updater.ready_sender.try_send(()); });