mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 06:42:16 +00:00
Fix peer memleak; stop goroutine when peer is offline
This commit is contained in:
parent
2113b6f4bb
commit
a9d8039082
@ -1196,6 +1196,7 @@ func (cs *ConsensusState) tryFinalizeCommit(height int) {
|
||||
}
|
||||
if !cs.ProposalBlock.HashesTo(hash) {
|
||||
// TODO: this happens every time if we're not a validator (ugly logs)
|
||||
// TODO: ^^ wait, why does it matter that we're a validator?
|
||||
log.Warn("Attempt to finalize failed. We don't have the commit block.")
|
||||
return
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ func (memR *MempoolReactor) broadcastTxRoutine(peer Peer) {
|
||||
|
||||
var next *clist.CElement
|
||||
for {
|
||||
if !memR.IsRunning() {
|
||||
if !memR.IsRunning() || !peer.IsRunning() {
|
||||
return // Quit!
|
||||
}
|
||||
if next == nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user