From 37f5766fed83c8f48777bf8171622c5c435223e2 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Wed, 9 Aug 2023 13:23:11 -0600 Subject: [PATCH] Use fresh context for Unlock (fix #247) --- storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage.go b/storage.go index 5ee39291..6089bb9b 100644 --- a/storage.go +++ b/storage.go @@ -289,7 +289,7 @@ func acquireLock(ctx context.Context, storage Storage, lockKey string) error { } func releaseLock(ctx context.Context, storage Storage, lockKey string) error { - err := storage.Unlock(ctx, lockKey) + err := storage.Unlock(context.TODO(), lockKey) // TODO: in Go 1.21, use WithoutCancel (see #247) if err == nil { locksMu.Lock() delete(locks, lockKey)