diff --git a/tooz/drivers/redis.py b/tooz/drivers/redis.py index 00a0ba78..d3cf4f6d 100644 --- a/tooz/drivers/redis.py +++ b/tooz/drivers/redis.py @@ -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):