Commit 197e5ec1 authored by Vincent Pelletier's avatar Vincent Pelletier

Drop unneeded code.

There is no need to react on every packet to mark a node as running. This
is updated on connection/disconnection, and it is sufficient.
parent 1740e0c8
...@@ -496,7 +496,6 @@ class Connection(BaseConnection): ...@@ -496,7 +496,6 @@ class Connection(BaseConnection):
# process the network events with the last registered handler to # process the network events with the last registered handler to
# solve issues where a node is lost with pending handlers and # solve issues where a node is lost with pending handlers and
# create unexpected side effects. # create unexpected side effects.
neo.lib.logging.debug('closing a connector for %r', self)
handler = self._handlers.getLastHandler() handler = self._handlers.getLastHandler()
super(Connection, self).close() super(Connection, self).close()
if self._on_close is not None: if self._on_close is not None:
......
...@@ -23,10 +23,6 @@ from . import MasterHandler ...@@ -23,10 +23,6 @@ from . import MasterHandler
class IdentificationHandler(MasterHandler): class IdentificationHandler(MasterHandler):
def nodeLost(self, conn, node):
neo.lib.logging.warning(
'lost a node in IdentificationHandler : %s' % node)
def requestIdentification(self, conn, node_type, uuid, address, name): def requestIdentification(self, conn, node_type, uuid, address, name):
self.checkClusterName(name) self.checkClusterName(name)
......
...@@ -37,13 +37,6 @@ class SecondaryMasterHandler(MasterHandler): ...@@ -37,13 +37,6 @@ class SecondaryMasterHandler(MasterHandler):
class PrimaryHandler(MasterHandler): class PrimaryHandler(MasterHandler):
""" Handler used by secondaries to handle primary master""" """ Handler used by secondaries to handle primary master"""
def packetReceived(self, conn, packet, kw):
if not conn.isServer():
node = self.app.nm.getByAddress(conn.getAddress())
if not node.isBroken():
node.setRunning()
super(PrimaryHandler, self).packetReceived(conn, packet, kw)
def connectionLost(self, conn, new_state): def connectionLost(self, conn, new_state):
self.app.primary_master_node.setDown() self.app.primary_master_node.setDown()
raise PrimaryFailure, 'primary master is dead' raise PrimaryFailure, 'primary master is dead'
...@@ -110,5 +103,3 @@ class PrimaryHandler(MasterHandler): ...@@ -110,5 +103,3 @@ class PrimaryHandler(MasterHandler):
app.name app.name
)) ))
def notifyClusterInformation(self, conn, state):
pass
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