|
|
@ -233,11 +233,13 @@ PeerManager.prototype.discoverPeers = function(callback) { |
|
|
|
// if so, just pass back cached peer list
|
|
|
|
return done(null, self.seeds.results[seed]); |
|
|
|
} |
|
|
|
|
|
|
|
// has this seed failed to resolve?
|
|
|
|
if (~self.seeds.failed.indexOf(seed)) { |
|
|
|
// if so, pass back empty results
|
|
|
|
return done(null, []); |
|
|
|
} |
|
|
|
|
|
|
|
// otherwise resolve the dns seed to get some peers
|
|
|
|
log.info('resolving dns seed '+ seed); |
|
|
|
dns.resolve(seed, function(err, peers) { |
|
|
@ -251,6 +253,7 @@ PeerManager.prototype.discoverPeers = function(callback) { |
|
|
|
self.seeds.results[seed] = peers; |
|
|
|
return done(null, peers); |
|
|
|
}); |
|
|
|
|
|
|
|
}; |
|
|
|
}); |
|
|
|
|
|
|
|