small fix to locking

This commit is contained in:
2026-03-08 23:12:47 -06:00
parent e2b5ca47ab
commit c4a06d6c6a
-2
View File
@@ -187,8 +187,6 @@ func (lf *amLogFile) rotate() error {
if lf.keep == 0 && lf.keepCompressed == 0 {
return nil // degenerate case, keep the log file the same
}
lf.mutex.Lock()
defer lf.mutex.Unlock()
// Close existing logfile if it's open.
reopen := lf.wr != nil
if reopen {