Commit 23cd2585 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Don't crash the application when a protocol error packet is received. Since the

connection should have been closed, the node should reconnect or trigger any
event as if it was disconnected.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1042 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent bb8106c2
...@@ -370,10 +370,11 @@ class EventHandler(object): ...@@ -370,10 +370,11 @@ class EventHandler(object):
handleTidNotFound = unexpectedPacket handleTidNotFound = unexpectedPacket
def handleProtocolError(self, conn, packet, message): def handleProtocolError(self, conn, packet, message):
raise RuntimeError, 'protocol error: %s' % (message,) # the connection should have been closed by the remote peer
logging.error('protocol error: %s' % (message,))
def handleTimeoutError(self, conn, packet, message): def handleTimeoutError(self, conn, packet, message):
raise RuntimeError, 'timeout error: %s' % (message,) logging.error('timeout error: %s' % (message,))
def handleBrokenNodeDisallowedError(self, conn, packet, message): def handleBrokenNodeDisallowedError(self, conn, packet, message):
raise RuntimeError, 'broken node disallowed error: %s' % (message,) raise RuntimeError, 'broken node disallowed error: %s' % (message,)
......
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