Commit b58721a3 authored by Vincent Pelletier's avatar Vincent Pelletier

Only poll when we have started to attemp connections. This removes a 1s-delay in election.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1172 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent cee4ef2a
......@@ -161,7 +161,6 @@ class Application(object):
try:
while 1:
em.poll(1)
current_time = time()
if current_time >= t + 1:
t = current_time
......@@ -187,6 +186,7 @@ class Application(object):
for addr in list(self.unconnected_master_node_set):
ClientConnection(em, client_handler, addr = addr,
connector_handler = self.connector_handler)
em.poll(1)
if (len(self.unconnected_master_node_set) == 0 \
and len(self.negotiating_master_node_set) == 0) \
or self.primary is not None:
......
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