mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-05 21:14:53 +00:00
consensus: don't wait for wal if conS not running
This commit is contained in:
@@ -319,7 +319,7 @@ func (cs *ConsensusState) startRoutines(maxSteps int) {
|
||||
|
||||
func (cs *ConsensusState) OnStop() {
|
||||
cs.QuitService.OnStop()
|
||||
if cs.wal != nil {
|
||||
if cs.wal != nil && cs.IsRunning() {
|
||||
cs.wal.Wait()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ func (wal *WAL) Save(msg ConsensusLogMessageInterface) {
|
||||
}
|
||||
}
|
||||
|
||||
// Must not be called concurrently.
|
||||
// Must not be called concurrently with a write.
|
||||
func (wal *WAL) Close() {
|
||||
if wal != nil {
|
||||
wal.fp.Close()
|
||||
|
||||
Reference in New Issue
Block a user