Skip to content

Commit cbe7db8

Browse files
committed
use custom err msg instead of ctx.Err()
Signed-off-by: Dr. Jan-Philip Gehrcke <[email protected]>
1 parent e8f9f34 commit cbe7db8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/flock/flock.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (l *Flock) Acquire(ctx context.Context, opts ...AcquireOption) (func(), err
107107
select {
108108
case <-ctx.Done():
109109
f.Close()
110-
return nil, ctx.Err()
110+
return nil, fmt.Errorf("context done before lock acquired (%s)", l.path)
111111
case <-ticker.C:
112112
// Retry flock().
113113
continue

0 commit comments

Comments
 (0)