Commit 81cbbeeb authored by Julien Muchembled's avatar Julien Muchembled

Do not answer pings on aborted connections

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2727 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 25ca11ce
......@@ -490,7 +490,6 @@ class Connection(BaseConnection):
"""Called when self is readable."""
self._recv()
self.analyse()
if self.aborted:
self.em.removeReader(self)
......@@ -510,7 +509,8 @@ class Connection(BaseConnection):
if packet_type == Packets.Ping:
# Send a pong notification
PACKET_LOGGER.dispatch(self, packet, 'from')
self.answer(Packets.Pong(), packet.getId())
if not self.aborted:
self.answer(Packets.Pong(), packet.getId())
elif packet_type == Packets.Pong:
# Skip PONG packets, its only purpose is refresh the timeout
# generated upong ping. But still log them.
......
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