clientv3/concurrency: do not swallow error
@@ -82,12 +82,11 @@ func (m *Mutex) Lock(ctx context.Context) error {
client := m.s.Client()
// wait for deletion revisions prior to myKey
// TODO: early termination if the session key is deleted before other session keys with smaller revisions.
- hdr, werr := waitDeletes(ctx, client, m.pfx, m.myRev-1)
+ _, werr := waitDeletes(ctx, client, m.pfx, m.myRev-1)
// release lock key if wait failed
if werr != nil {
m.Unlock(client.Ctx())
- } else {
- m.hdr = hdr
+ return werr
}
// make sure the session is not expired, and the owner key still exists.
