Consume ping errors so they aren't printed in the log.
authorCameron Dale <camrdale@gmail.com>
Sat, 21 Jun 2008 19:59:21 +0000 (12:59 -0700)
committerCameron Dale <camrdale@gmail.com>
Sat, 21 Jun 2008 19:59:21 +0000 (12:59 -0700)
apt_p2p_Khashmir/khashmir.py

index f711a6a..13bfb5a 100644 (file)
@@ -288,7 +288,11 @@ class KhashmirBase(protocol.Factory):
         """Error occurred, fail node."""
         log.msg("action ping failed on %s/%s: %s" % (node.host, node.port, err.getErrorMessage()))
         self.stats.completedAction('ping', start)
+        
+        # Consume unhandled errors
+        self.pinging[node.id].addErrback(lambda ping_err: None)
         del self.pinging[node.id]
+        
         self.nodeFailed(node)
         return err