Skip to content

Commit c520ce8

Browse files
committed
Fixup Redis lock context compilation error
Related to RichardKnop#793; see RichardKnop#803.
1 parent 0c29c70 commit c520ce8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

v2/locks/redis/redis.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ func (r Lock) LockWithRetries(key string, unixTsToExpireNs int64) error {
6464
func (r Lock) Lock(key string, unixTsToExpireNs int64) error {
6565
now := time.Now().UnixNano()
6666
expiration := time.Duration(unixTsToExpireNs + 1 - now)
67-
ctx := r.rclient.Context()
67+
// ctx := r.rclient.Context()
68+
ctx := context.Background()
6869

6970
success, err := r.rclient.SetNX(ctx, key, unixTsToExpireNs, expiration).Result()
7071
if err != nil {

0 commit comments

Comments
 (0)