diff --git a/wal/wal.go b/wal/wal.go index adcbb5a41ad..7169a575237 100644 --- a/wal/wal.go +++ b/wal/wal.go @@ -504,12 +504,7 @@ func (w *WAL) Close() error { plog.Errorf("failed to unlock during closing wal: %s", err) } } - - if err := w.dirFile.Close(); err != nil { - return err - } - - return nil + return w.dirFile.Close() } func (w *WAL) saveEntry(e *raftpb.Entry) error {