Commit 9efd784d authored by Vincent Pelletier's avatar Vincent Pelletier

Replace a local boolean var with proper test nesting.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@993 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 972182cc
......@@ -196,12 +196,10 @@ class PrimaryNotificationsHandler(BaseHandler):
if node_type != STORAGE_NODE_TYPE or state != RUNNING_STATE:
continue
# close connection to this storage if no longer running
closed = False
conn = self.app.em.getConnectionByUUID(uuid)
if conn is not None:
conn.close()
closed = True
if closed and node_type == STORAGE_NODE_TYPE:
if node_type == STORAGE_NODE_TYPE:
# Remove from pool connection
app.cp.removeConnection(n)
# Put fake packets to task queues.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment