Merge "redis: always remove lock from acquired lock when release()ing"

This commit is contained in:
Jenkins 2017-08-23 17:08:12 +00:00 committed by Gerrit Code Review
commit 29ec8eb26a
1 changed files with 2 additions and 1 deletions

View File

@ -102,7 +102,8 @@ class RedisLock(locking.Lock):
except exceptions.LockError as e:
LOG.error("Unable to release lock '%r': %s", self, e)
return False
self._coord._acquired_locks.discard(self)
finally:
self._coord._acquired_locks.discard(self)
return True
def heartbeat(self):