Browse Source

some aesthetic changes

patch-2
Gordon Hall 11 years ago
parent
commit
f877b3e563
  1. 3
      lib/PeerManager.js

3
lib/PeerManager.js

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

Loading…
Cancel
Save