From f5b2c13d93303803a3fa4ba64524cdfd56c308e0 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 14 Jul 2015 21:18:57 -0400 Subject: [PATCH] Bug fix in protocol.handleCallResponse isNewNode was called after the contact was added to the routing table meaning it would always return false and the key/values would never be transferred. --- kademlia/protocol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kademlia/protocol.py b/kademlia/protocol.py index 7d963e4..fc11991 100644 --- a/kademlia/protocol.py +++ b/kademlia/protocol.py @@ -108,9 +108,9 @@ class KademliaProtocol(RPCProtocol): """ if result[0]: self.log.info("got response from %s, adding to router" % node) - self.router.addContact(node) if self.router.isNewNode(node): self.transferKeyValues(node) + self.router.addContact(node) else: self.log.debug("no response from %s, removing from router" % node) self.router.removeContact(node)