Skip to content

Commit

Permalink
Make it done when Push to the notify channel if given
Browse files Browse the repository at this point in the history
make sure it done,Push to the notify channel if given when shutdown sign  arrvied.
  • Loading branch information
SchopenhauerZhang authored Sep 5, 2023
1 parent 3b0f2e5 commit 6afcd70
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,11 @@ func (r *Raft) runLeader() {
select {
case notify <- true:
case <-r.shutdownCh:
// make sure push to the notify channel ( if given )
select {
case notify <- true:
default:
}
}
}

Expand Down

0 comments on commit 6afcd70

Please # to comment.