Skip to content

Commit

Permalink
IndexerService should use is_cancelled() to check if ckb received c…
Browse files Browse the repository at this point in the history
…trl-c signal
  • Loading branch information
eval-exec committed Feb 18, 2024
1 parent 36f5b22 commit fd6987d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions util/indexer/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,9 @@ impl IndexerService {
self.async_handle.spawn(async move {
let _initial_finished = initial_syncing.await;
info!("initial_syncing finished");

tokio::select! {
_ = stop.cancelled() => {
info!("Indexer received exit signal, cancel new_block_watcher task, exit now");
return;
},
else => {},
if stop.is_cancelled() {
info!("Indexer received exit signal, cancel new_block_watcher task, exit now");
return;
}

let mut new_block_watcher = notify_controller
Expand Down

0 comments on commit fd6987d

Please sign in to comment.