Commit 10e6c2e1 authored by Vincent Pelletier's avatar Vincent Pelletier

Move invariant out of loop.

parent 98bc6f10
......@@ -345,10 +345,10 @@ class Application(object):
# Wait for an announcement. If this is too long, probably
# the primary master is down.
t = time()
t = time() + 10
while self.primary_master_node is None:
if t + 10 < time():
if t < time():
# election timeout
raise ElectionFailure("Election timeout")
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