Skip to content

Commit

Permalink
Return error when GetVal gives error
Browse files Browse the repository at this point in the history
Signed-off-by: Vignesh Laxman <[email protected]>
  • Loading branch information
vlaxman-px committed Sep 26, 2023
1 parent 1762429 commit 793a41c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions etcd/v3/kv_etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,7 @@ func (et *etcdKV) LockWithTimeout(
if _, errGet := et.GetVal(key, &currLockerTag); errGet == nil {
return nil, fmt.Errorf("failed to take a lock on %v: lock taken by: %v ", key, currLockerTag.LockerID)
}
return nil, fmt.Errorf("failed to take a lock on %v", key)
}
}
if err != nil {
Expand Down

0 comments on commit 793a41c

Please sign in to comment.