Skip to content

Commit

Permalink
fix shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
grooviegermanikus committed Aug 11, 2024
1 parent 12b0c4f commit 8891828
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions chaindata_standalone/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ fn debug_chaindata(chain_data: Arc<RwLock<ChainData>>, 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() {
Expand Down
3 changes: 1 addition & 2 deletions chaindata_standalone/src/router_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)>,
Expand Down Expand Up @@ -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(());
});
Expand Down

0 comments on commit 8891828

Please sign in to comment.