node-gossip icon indicating copy to clipboard operation
node-gossip copied to clipboard

Wrong peer_name

Open tsouza opened this issue 12 years ago • 1 comments

Hello,

It seems that peer_name is wrong when ip_to_bind is passed.

At gossiper.js:35 shouldn't it be? (as there is no address property)

this.peer_name    = [this.ip_to_bind, this.port.toString()].join(':');

Cheers

tsouza avatar Jan 03 '13 16:01 tsouza

I've just assigned the address property manually when specifying an ip to bind to.

var Gossiper = require('./node-gossip/index.js').Gossiper
var g = new Gossiper(9000, [], '192.168.1.1');
g.address = '8.8.8.8';
g.start();

The code does seem to assume that whatever you're binding to can be routed to from any peers.

snoj avatar Jan 16 '13 18:01 snoj