Commit e41dbfef authored by Julien Muchembled's avatar Julien Muchembled

election: fix a case where the primary has wrong state information about another master

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2722 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 4836a4b4
......@@ -172,13 +172,10 @@ class ServerElectionHandler(MasterHandler):
def reelectPrimary(self, conn):
raise ElectionFailure, 'reelection requested'
def peerBroken(self, conn):
app = self.app
addr = conn.getAddress()
node = app.nm.getByAddress(addr)
if node is not None and node.getUUID() is not None:
node.setBroken()
MasterHandler.peerBroken(self, conn)
def connectionLost(self, conn, new_state):
node = self.app.nm.getByUUID(conn.getUUID())
if node is not None:
node.setState(new_state)
def requestIdentification(self, conn, node_type,
uuid, address, name):
......
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