From: Cameron Dale Date: Tue, 29 Apr 2008 00:36:30 +0000 (-0700) Subject: Don't try and add ourself to the routing table during an action. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=93d19a10800dde7d6bfbc3fa63b0a41507a43446;p=quix0rs-apt-p2p.git Don't try and add ourself to the routing table during an action. --- diff --git a/apt_p2p_Khashmir/actions.py b/apt_p2p_Khashmir/actions.py index fc8746c..2d389b4 100644 --- a/apt_p2p_Khashmir/actions.py +++ b/apt_p2p_Khashmir/actions.py @@ -184,7 +184,8 @@ class ActionBase: def gotResponse(self, dict, node, expected_results, df): """Receive a response from a remote node.""" - reactor.callLater(0, self.caller.insertNode, node) + if node.id != self.caller.node.id: + reactor.callLater(0, self.caller.insertNode, node) if self.finished or self.answered.has_key(node.id): # a day late and a dollar short return @@ -197,7 +198,8 @@ class ActionBase: def actionFailed(self, err, node, expected_results, df): """Receive an error from a remote node.""" log.msg("action %s failed on %s/%s: %s" % (self.action, node.host, node.port, err.getErrorMessage())) - self.caller.table.nodeFailed(node) + if node.id != self.caller.node.id: + self.caller.table.nodeFailed(node) self.outstanding -= 1 self.outstanding_results -= expected_results self.schedule()