mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-03 11:45:18 +00:00
lint: add errchecks (#5316)
## Description Work towards enabling errcheck ref #5059
This commit is contained in:
@@ -126,7 +126,9 @@ func (wal *BaseWAL) OnStart() error {
|
||||
if err != nil {
|
||||
return err
|
||||
} else if size == 0 {
|
||||
wal.WriteSync(EndHeightMessage{0})
|
||||
if err := wal.WriteSync(EndHeightMessage{0}); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
err = wal.group.Start()
|
||||
if err != nil {
|
||||
@@ -161,8 +163,12 @@ func (wal *BaseWAL) FlushAndSync() error {
|
||||
// before cleaning up files.
|
||||
func (wal *BaseWAL) OnStop() {
|
||||
wal.flushTicker.Stop()
|
||||
wal.FlushAndSync()
|
||||
wal.group.Stop()
|
||||
if err := wal.FlushAndSync(); err != nil {
|
||||
wal.Logger.Error("error on flush data to disk", "error", err)
|
||||
}
|
||||
if err := wal.group.Stop(); err != nil {
|
||||
wal.Logger.Error("error trying to stop wal", "error", err)
|
||||
}
|
||||
wal.group.Close()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user