fixed stun call

This commit is contained in:
Brian Muller 2014-01-13 22:41:31 -05:00
parent 10925520c4
commit e2b748a108

View File

@ -197,12 +197,13 @@ class Server(object):
C{list} will be empty. C{list} will be empty.
""" """
def handle(results): def handle(results):
ips = [ result[0] for result in results if result is not None ] ips = [ result[1][0] for result in results if result[0] ]
self.log.debug("other nodes think our ip is %s" % str(ips)) self.log.debug("other nodes think our ip is %s" % str(ips))
return ips return ips
ds = [] ds = []
for neighbor in self.bootstrappableNeighbors(): for neighbor in self.bootstrappableNeighbors():
ds.append(self.protocol.router.stun(neighbor)) ds.append(self.protocol.stun(neighbor))
return defer.gatherResults(ds).addCallback(handle) return defer.gatherResults(ds).addCallback(handle)
def get(self, key): def get(self, key):