diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2012-01-24 01:39:07 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2012-01-24 03:11:44 +0400 |
commit | aef62a03ee27ffb149950df5caccc2b4965169d8 (patch) | |
tree | d5b5dfa7b0a6d05e839aee96714f4ff80f45488b /test | |
parent | 9037decb28e324b78a310d2557dc12c177cbaee1 (diff) |
test: join multicast group *after* binding
Diffstat (limited to 'test')
-rw-r--r-- | test/simple/test-dgram-multicast-multi-process.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/simple/test-dgram-multicast-multi-process.js b/test/simple/test-dgram-multicast-multi-process.js index 784bb6c0943..79df7a9e561 100644 --- a/test/simple/test-dgram-multicast-multi-process.js +++ b/test/simple/test-dgram-multicast-multi-process.js @@ -129,8 +129,6 @@ if (!cluster.isMaster) { var receivedMessages = []; var listenSocket = dgram.createSocket('udp4'); - listenSocket.addMembership(LOCAL_BROADCAST_HOST); - listenSocket.on('message', function(buf, rinfo) { console.error('%s received %s from %j', process.pid ,util.inspect(buf.toString()), rinfo); @@ -157,4 +155,6 @@ if (!cluster.isMaster) { }); listenSocket.bind(common.PORT); + + listenSocket.addMembership(LOCAL_BROADCAST_HOST); } |