X-Git-Url: https://git.mxchange.org/?p=quix0rs-apt-p2p.git;a=blobdiff_plain;f=apt_dht_Khashmir%2Factions.py;h=6766cd9c6169dd8301cd6ff6c052d663175b0541;hp=b8f5c8ccd2c2ff75d3fe5d2ff83d7eb44a091dbe;hb=8f102eb1964db2ac18d4bac9e399c069a4cb616e;hpb=2995ddfcfe23b24e366156530b2207d434fb8344 diff --git a/apt_dht_Khashmir/actions.py b/apt_dht_Khashmir/actions.py index b8f5c8c..6766cd9 100644 --- a/apt_dht_Khashmir/actions.py +++ b/apt_dht_Khashmir/actions.py @@ -45,6 +45,8 @@ class FindNode(ActionBase): dict = dict['rsp'] n = self.caller.Node(dict["id"], _krpc_sender[0], _krpc_sender[1]) self.caller.insertNode(n) + if dict["id"] in self.found: + self.found[dict["id"]].updateToken(dict.get('token', '')) l = dict["nodes"] if self.finished or self.answered.has_key(dict["id"]): # a day late and a dollar short @@ -239,7 +241,7 @@ class StoreValue(ActionBase): except AttributeError: log.msg("%s doesn't have a %s method!" % (node, self.store)) else: - df = f(self.target, self.value, self.caller.node.id) + df = f(self.target, self.value, node.token, self.caller.node.id) df.addCallback(self.storedValue, node=node) df.addErrback(self.storeFailed, node=node)