]> git.mxchange.org Git - quix0rs-apt-p2p.git/commitdiff
fix peer update problem connection refused in store value
authorburris <burris>
Mon, 23 Sep 2002 23:09:35 +0000 (23:09 +0000)
committerburris <burris>
Mon, 23 Sep 2002 23:09:35 +0000 (23:09 +0000)
khashmir.py
ktable.py

index b0325b1f897cb5eef82efacec33ac65d79c48da8..a41fc17e6441c00d5edb0b2d79eb625bfccc83cf 100644 (file)
@@ -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)
        
index 711a537f4ad3eaa3b3b62f5f7a7d0e0757706e15..aa86eb9bb66895024349a513afaa3b822a7764b6 100644 (file)
--- 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