Skip to content

Commit 357fd7c

Browse files
We should probably at least check the error value and log it...
1 parent bfd6d51 commit 357fd7c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/stanza/fileconsumer/internal/reader/reader_unix.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ func (r *Reader) tryLockFile() bool {
2424
}
2525

2626
func (r *Reader) unlockFile() {
27-
unix.Flock(int(r.file.Fd()), unix.LOCK_UN)
27+
if err := unix.Flock(int(r.file.Fd()), unix.LOCK_UN); err != nil {
28+
r.set.Logger.Error("Failed to unlock", zap.Error(err))
29+
}
2830
}

0 commit comments

Comments
 (0)