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.
This commit is contained in:
Chris 2015-07-14 21:18:57 -04:00
parent ccf18622b4
commit f5b2c13d93
1 changed files with 1 additions and 1 deletions

View File

@ -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)