Skip to content

Commit

Permalink
Merge pull request #10162 from jingyih/automated-cherry-pick-of-#1015…
Browse files Browse the repository at this point in the history
…3-origin-release-3.2

clientv3: automated cherry pick of #10153 to release-3.2
  • Loading branch information
jingyih authored Oct 9, 2018
2 parents a4a8d07 + 26cce20 commit afa5bed
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions clientv3/concurrency/mutex.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,10 @@ func (m *Mutex) Lock(ctx context.Context) error {

// wait for deletion revisions prior to myKey
hdr, werr := waitDeletes(ctx, client, m.pfx, m.myRev-1)
// release lock key if cancelled
select {
case <-ctx.Done():
// release lock key if wait failed
if werr != nil {
m.Unlock(client.Ctx())
default:
} else {
m.hdr = hdr
}
return werr
Expand Down

0 comments on commit afa5bed

Please sign in to comment.