From: Cameron Dale <camrdale@gmail.com>
Date: Sat, 21 Jun 2008 19:59:21 +0000 (-0700)
Subject: Consume ping errors so they aren't printed in the log.
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ab5c9122bd5425203232914b36178c08378d92e0;p=quix0rs-apt-p2p.git

Consume ping errors so they aren't printed in the log.
---

diff --git a/apt_p2p_Khashmir/khashmir.py b/apt_p2p_Khashmir/khashmir.py
index f711a6a..13bfb5a 100644
--- a/apt_p2p_Khashmir/khashmir.py
+++ b/apt_p2p_Khashmir/khashmir.py
@@ -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