]> git.mxchange.org Git - quix0rs-apt-p2p.git/commitdiff
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 f711a6a62a315964a339b03085d809079b0a2b6d..13bfb5a23352f91d603168945d54d614c351fe3f 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