Commit 7eeafe4d authored by Vincent Pelletier's avatar Vincent Pelletier

Make all election handler classes inherit from ElectionHandler: master will...

Make all election handler classes inherit from ElectionHandler: master will send a notification to all nodes that a new master appeared, which includes the new master itself, so it must expect a NotifyNodeInformation packet.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1189 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent a582e433
......@@ -65,7 +65,7 @@ class ElectionHandler(MasterHandler):
c.close()
node.setState(state)
class ClientElectionHandler(MasterHandler):
class ClientElectionHandler(ElectionHandler):
def packetReceived(self, conn, packet):
node = self.app.nm.getNodeByServer(conn.getAddress())
......@@ -198,7 +198,7 @@ class ClientElectionHandler(MasterHandler):
app.uuid, app.server, app.name))
class ServerElectionHandler(MasterHandler):
class ServerElectionHandler(ElectionHandler):
def handleReelectPrimaryMaster(self, conn, packet):
raise ElectionFailure, 'reelection requested'
......
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