evidence: terminate broadcastEvidenceRoutine when peer is stopped (#6069)

This commit is contained in:
Anton Kaliaev
2021-02-15 11:11:55 +04:00
committed by GitHub
parent 99b337c5d8
commit 2e406e0d78
2 changed files with 3 additions and 0 deletions

View File

@@ -28,3 +28,4 @@ Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermi
- [blockchain/v1] [\#5701](https://github.com/tendermint/tendermint/pull/5701) Handle peers without blocks (@melekes)
- [blockchain/v1] \#5711 Fix deadlock (@melekes)
- [proxy] \#5078 Fix a bug, where TM does not exit when ABCI app crashes (@melekes)
- [evidence] \#6068 Terminate broadcastEvidenceRoutine when peer is stopped (@melekes)

View File

@@ -129,6 +129,8 @@ func (evR *Reactor) broadcastEvidenceRoutine(peer p2p.Peer) {
case <-evR.Quit():
return
}
} else if !peer.IsRunning() || !evR.IsRunning() {
return
}
ev := next.Value.(types.Evidence)