Fix missing node state refresh in static driver

Change-Id: Ie60ae37f40c149120fa5ed0c74e1722bf038c3f9
This commit is contained in:
Simon Westphahl 2018-09-05 16:17:05 +02:00
parent 55e70f7636
commit 4c5d75c9e8
1 changed files with 5 additions and 1 deletions

View File

@ -197,7 +197,11 @@ class StaticNodeProvider(Provider):
# It's already locked so skip it.
continue
if node.state != zk.READY:
# Double check the state now that we have a lock since it
# may have changed on us. We keep using the original node
# since it's holding the lock.
_node = self.zk.getNode(node.id)
if _node.state != zk.READY:
# State changed so skip it.
self.zk.unlockNode(node)
continue