self.found[node.id] = node
#xxx t.timeout = time.time() + FIND_NODE_TIMEOUT
df = node.findValue(self.target, self.table.node.senderDict())
- df.addCallbacks(self.handleGotNodes, self.defaultGotNodes)
+ df.addCallback(self.handleGotNodes)
+ df.addErrback(self.defaultGotNodes)
self.outstanding = self.outstanding + 1
self.queried[node.id] = 1
if self.outstanding == 0:
self.store.delete(h)
ic.delete()
i = i + 1
+ else:
+ break
irec = f()
reactor.callLater(KE_DELAY, self.doExpire)
v = loads(self.store[h1])[1]
l.append(v)
tup = c.next()
- l = map(lambda v: Binary(v), l)
return l
return []
self.insertNode(n)
l = self.retrieveValues(key)
- if len(l):
+ if len(l) > 0:
+ l = map(lambda v: Binary(v), l)
return {'values' : l}, self.node.senderDict()
else:
nodes = self.table.findNodes(key)
prot.args = self.args
prot.d = self.d
return prot
+
+ def clientConnectionFailed(self, connector, reason):
+ self.d.errback()
\ No newline at end of file