Browse Source

respawn receiveRoutine so we can properly exit

Closes #2072
pull/2135/head
Anton Kaliaev 6 years ago
parent
commit
4c5a143a70
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      consensus/state.go

+ 1
- 1
consensus/state.go View File

@ -556,6 +556,7 @@ func (cs *ConsensusState) receiveRoutine(maxSteps int) {
defer func() {
if r := recover(); r != nil {
cs.Logger.Error("CONSENSUS FAILURE!!!", "err", r, "stack", string(debug.Stack()))
go cs.receiveRoutine(0)
}
}()
@ -588,7 +589,6 @@ func (cs *ConsensusState) receiveRoutine(maxSteps int) {
// go to the next step
cs.handleTimeout(ti, rs)
case <-cs.Quit():
// NOTE: the internalMsgQueue may have signed messages from our
// priv_val that haven't hit the WAL, but its ok because
// priv_val tracks LastSig


Loading…
Cancel
Save