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:
parent
ccf18622b4
commit
f5b2c13d93
@ -108,9 +108,9 @@ class KademliaProtocol(RPCProtocol):
|
|||||||
"""
|
"""
|
||||||
if result[0]:
|
if result[0]:
|
||||||
self.log.info("got response from %s, adding to router" % node)
|
self.log.info("got response from %s, adding to router" % node)
|
||||||
self.router.addContact(node)
|
|
||||||
if self.router.isNewNode(node):
|
if self.router.isNewNode(node):
|
||||||
self.transferKeyValues(node)
|
self.transferKeyValues(node)
|
||||||
|
self.router.addContact(node)
|
||||||
else:
|
else:
|
||||||
self.log.debug("no response from %s, removing from router" % node)
|
self.log.debug("no response from %s, removing from router" % node)
|
||||||
self.router.removeContact(node)
|
self.router.removeContact(node)
|
||||||
|
Loading…
Reference in New Issue
Block a user