From 93d19a10800dde7d6bfbc3fa63b0a41507a43446 Mon Sep 17 00:00:00 2001 From: Cameron Dale Date: Mon, 28 Apr 2008 17:36:30 -0700 Subject: [PATCH] Don't try and add ourself to the routing table during an action. --- apt_p2p_Khashmir/actions.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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() -- 2.39.5