[Neo-report] r2727 jm - /trunk/neo/lib/connection.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Apr 21 17:09:55 CEST 2011


Author: jm
Date: Thu Apr 21 17:09:55 2011
New Revision: 2727

Log:
Do not answer pings on aborted connections

Modified:
    trunk/neo/lib/connection.py

Modified: trunk/neo/lib/connection.py
==============================================================================
--- trunk/neo/lib/connection.py [iso-8859-1] (original)
+++ trunk/neo/lib/connection.py [iso-8859-1] Thu Apr 21 17:09:55 2011
@@ -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.




More information about the Neo-report mailing list