From 6ce3847148ce27a6cebc56e0e176321eaceb0ee5 Mon Sep 17 00:00:00 2001 From: burris Date: Mon, 23 Sep 2002 23:09:35 +0000 Subject: [PATCH] fix peer update problem connection refused in store value --- khashmir.py | 2 +- ktable.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.5