Merge "redis: fix concurrent access on acquire()"

This commit is contained in:
Jenkins 2017-03-29 18:12:00 +00:00 committed by Gerrit Code Review
commit 9f87cf158d
1 changed files with 2 additions and 1 deletions

View File

@ -88,7 +88,8 @@ class RedisLock(locking.Lock):
acquired = self._lock.acquire(
blocking=blocking, blocking_timeout=timeout)
if acquired:
self._coord._acquired_locks.add(self)
with self._exclusive_access:
self._coord._acquired_locks.add(self)
return acquired
def release(self):