Merge pull request #347 from gordonwritescode/bug/peerdiscovery-network-ref
fix #346
This commit is contained in:
commit
e8d10c3045
|
@ -92,8 +92,8 @@ PeerManager.prototype.checkStatus = function checkStatus() {
|
||||||
|
|
||||||
// for debug purposes, print how many of our peers are actually connected
|
// for debug purposes, print how many of our peers are actually connected
|
||||||
var connected = 0
|
var connected = 0
|
||||||
this.peers.forEach(function(p) {
|
this.peers.forEach(function(p) {
|
||||||
if (p.connection && !p.connection._connecting) connected++
|
if (p.connection && !p.connection._connecting) connected++
|
||||||
});
|
});
|
||||||
log.info(connected + ' of ' + this.peers.length + ' peers connected');
|
log.info(connected + ' of ' + this.peers.length + ' peers connected');
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ PeerManager.prototype.discover = function(options, callback) {
|
||||||
|
|
||||||
// transform that list into a list of Peer instances
|
// transform that list into a list of Peer instances
|
||||||
peers = peers.map(function(ip) {
|
peers = peers.map(function(ip) {
|
||||||
return new Peer(ip, networks.defaultClientPort);
|
return new Peer(ip, networks[self.config.network].defaultClientPort);
|
||||||
});
|
});
|
||||||
|
|
||||||
peers.forEach(function(p) {
|
peers.forEach(function(p) {
|
||||||
|
|
Loading…
Reference in New Issue