Skip to content

Commit

Permalink
Fix a bug of hanging forever while on ibd (mit-dci#42)
Browse files Browse the repository at this point in the history
While we don't leave ibd, this code wouldn't shutdown if requested
  • Loading branch information
Davidson-Souza authored May 5, 2023
1 parent fd1b8ea commit b31cda0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/blockchain/p2p_blockchain/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,11 +650,10 @@ impl UtreexoNode {
timeout(Duration::from_millis(10), self.node_rx.recv()).await
{
try_and_log!(self.handle_notification(notification).await);
if *stop_signal.read().await {
break;
}
}

if *stop_signal.read().await {
break;
}
periodic_job!(
self.maybe_open_connection().await,
self.last_connection,
Expand Down

0 comments on commit b31cda0

Please sign in to comment.