Commit 9c0a0c9e by Julien Muchembled

client: code cleanup

1 parent cf413589
......@@ -115,10 +115,6 @@ class Application(object):
# _connecting_to_master_node is used to prevent simultaneous master
# node connection attemps
self._connecting_to_master_node = Lock()
# _nm ensure exclusive access to the node manager
lock = Lock()
self._nm_acquire = lock.acquire
self._nm_release = lock.release
self.compress = compress
registerLiveDebugger(on_log=self.log)
......
......@@ -123,14 +123,13 @@ class ConnectionPool(object):
cell_list.sort(key=self.getCellSortKey)
for cell in cell_list:
node = cell.getNode()
if node.isRunning():
conn = getConnForNode(node)
if conn is not None:
yield (node, conn)
# Re-check if node is running, as our knowledge of its
# state can have changed during connection attempt.
elif node.isRunning():
new_cell_list.append(cell)
conn = getConnForNode(node)
if conn is not None:
yield node, conn
# Re-check if node is running, as our knowledge of its
# state can have changed during connection attempt.
elif node.isRunning():
new_cell_list.append(cell)
if not new_cell_list:
break
cell_list = new_cell_list
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!