Skip to content

Commit

Permalink
Merge pull request #4531 from eval-exec/exec/backport/4527
Browse files Browse the repository at this point in the history
Backport #4527 Early return process_fetch_cmd if ckb received exit signal
  • Loading branch information
doitian committed Jul 22, 2024
2 parents 7d4ce27 + f81e42b commit 1474782
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sync/src/synchronizer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,17 @@ impl BlockFetchCMD {
match self.can_start() {
CanStart::Ready => {
for peer in peers {
if ckb_stop_handler::has_received_stop_signal() {
return;
}

if let Some(fetch) =
BlockFetcher::new(Arc::clone(&self.sync_shared), peer, ibd_state).fetch()
{
for item in fetch {
if ckb_stop_handler::has_received_stop_signal() {
return;
}
BlockFetchCMD::send_getblocks(item, &self.p2p_control, peer);
}
}
Expand Down

0 comments on commit 1474782

Please sign in to comment.