Commit d48c6993 authored by Aurel's avatar Aurel

do not send info about admin node to other node


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@554 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 7457be46
......@@ -337,16 +337,17 @@ class Application(object):
""" Send informations on all nodes through the given connection """
node_list = []
for n in self.nm.getNodeList():
try:
ip_address, port = n.getServer()
except TypeError:
ip_address, port = '0.0.0.0', 0
node_list.append((n.getNodeType(), ip_address, port,
n.getUUID() or INVALID_UUID, n.getState()))
# Split the packet if too huge.
if len(node_list) == 10000:
conn.notify(protocol.notifyNodeInformation(node_list))
del node_list[:]
if n.getNodeType() != ADMIN_NODE_TYPE:
try:
ip_address, port = n.getServer()
except TypeError:
ip_address, port = '0.0.0.0', 0
node_list.append((n.getNodeType(), ip_address, port,
n.getUUID() or INVALID_UUID, n.getState()))
# Split the packet if too huge.
if len(node_list) == 10000:
conn.notify(protocol.notifyNodeInformation(node_list))
del node_list[:]
if node_list:
conn.notify(protocol.notifyNodeInformation(node_list))
......
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