From 363b924bf090c1097cfc9d28718ca8e135316a17 Mon Sep 17 00:00:00 2001 From: Sam Decrock Date: Thu, 31 May 2012 13:11:29 +0200 Subject: [PATCH] fixed issue #2 addMembership() should come after bind() --- lib/upnp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/upnp.js b/lib/upnp.js index 2900494..5f6add8 100644 --- a/lib/upnp.js +++ b/lib/upnp.js @@ -31,11 +31,11 @@ if (process.env.NODE_DEBUG && /upnp/.test(process.env.NODE_DEBUG)) { function ControlPoint() { events.EventEmitter.call(this); this.server = dgram.createSocket('udp4'); - this.server.addMembership(BROADCAST_ADDR); var self = this; this.server.on('message', function(msg, rinfo) {self.onRequestMessage(msg, rinfo);}); this._initParsers(); this.server.bind(SSDP_PORT); + this.server.addMembership(BROADCAST_ADDR); //fixed issue #2 } util.inherits(ControlPoint, events.EventEmitter); exports.ControlPoint = ControlPoint;