From: burris Date: Mon, 23 Sep 2002 23:09:35 +0000 (+0000) Subject: fix peer update problem connection refused in store value X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6ce38471;p=quix0rs-apt-p2p.git fix peer update problem connection refused in store value --- diff --git a/khashmir.py b/khashmir.py index b0325b1..a41fc17 100644 --- a/khashmir.py +++ b/khashmir.py @@ -130,7 +130,7 @@ class Khashmir(xmlrpc.XMLRPC): def default(err, node=node, table=table): table.nodeFailed(node) df = node.storeValue(key, value, self.node.senderDict()) - df.addCallback(cb) + df.addCallbacks(cb, lambda: None) # this call is asynch self.findNode(key, _storeValueForKey) diff --git a/ktable.py b/ktable.py index 711a537..aa86eb9 100644 --- a/ktable.py +++ b/ktable.py @@ -125,10 +125,11 @@ class KTable: if contacted: node.updateLastSeen() # move node to end of bucket + xnode = self.buckets[i].l[it] del(self.buckets[i].l[it]) # note that we removed the original and replaced it with the new one # utilizing this nodes new contact info - self.buckets[i].l.append(node) + self.buckets[i].l.append(xnode) self.buckets[i].touch() return