consensus: drain messages and transactions on exit as well
There might be some threads blocked on these channels.
This commit is contained in:
parent
cd4f46247d
commit
527505ea5e
1 changed files with 6 additions and 2 deletions
|
@ -332,14 +332,18 @@ events:
|
|||
default:
|
||||
}
|
||||
}
|
||||
drainBlocksLoop:
|
||||
drainLoop:
|
||||
for {
|
||||
select {
|
||||
case <-s.messages:
|
||||
case <-s.transactions:
|
||||
case <-s.blockEvents:
|
||||
default:
|
||||
break drainBlocksLoop
|
||||
break drainLoop
|
||||
}
|
||||
}
|
||||
close(s.messages)
|
||||
close(s.transactions)
|
||||
close(s.blockEvents)
|
||||
close(s.finished)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue