From 20d17d5096229c8cb867c8a18fa4d9b6596a6828 Mon Sep 17 00:00:00 2001 From: Alireza Ghasemi Date: Thu, 28 Mar 2024 18:28:48 +0330 Subject: [PATCH] Fixup Redis lock context compilation error Related to #803. --- v2/locks/redis/redis.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v2/locks/redis/redis.go b/v2/locks/redis/redis.go index 6cbd8951..fbc27991 100644 --- a/v2/locks/redis/redis.go +++ b/v2/locks/redis/redis.go @@ -64,7 +64,8 @@ func (r Lock) LockWithRetries(key string, unixTsToExpireNs int64) error { func (r Lock) Lock(key string, unixTsToExpireNs int64) error { now := time.Now().UnixNano() expiration := time.Duration(unixTsToExpireNs + 1 - now) - ctx := r.rclient.Context() + // ctx := r.rclient.Context() + ctx := context.Background() success, err := r.rclient.SetNX(ctx, key, unixTsToExpireNs, expiration).Result() if err != nil {