Skip to content

Commit

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

clientv3: automated cherry pick of #10153 to release 3.1
  • Loading branch information
jingyih committed Oct 9, 2018
2 parents 65fff06 + cf7be48 commit 3e99b42
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions clientv3/concurrency/mutex.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,9 @@ func (m *Mutex) Lock(ctx context.Context) error {

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

0 comments on commit 3e99b42

Please sign in to comment.