Skip to content

Commit ab56b15

Browse files
committed
test: remove dropMembership() call
According to docs, dropMembership() is automatically called by the kernel when the socket is closed, and most apps will never need to call it. It's called here as a sanity check only so let's note that with a comment.
1 parent 03d2bd3 commit ab56b15

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/internet/test-dgram-multicast-multi-process.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ var common = require('../common'),
33
assert = require('assert'),
44
dgram = require('dgram'),
55
util = require('util'),
6-
assert = require('assert'),
76
Buffer = require('buffer').Buffer,
87
fork = require('child_process').fork,
98
LOCAL_BROADCAST_HOST = '224.0.0.114',
@@ -183,10 +182,9 @@ if (process.argv[2] === 'child') {
183182
process.send({ message: buf.toString() });
184183

185184
if (receivedMessages.length == messages.length) {
185+
// .dropMembership() not strictly needed but here as a sanity check
186186
listenSocket.dropMembership(LOCAL_BROADCAST_HOST);
187-
188-
process.nextTick(function() { // TODO should be changed to below.
189-
// listenSocket.dropMembership(LOCAL_BROADCAST_HOST, function() {
187+
process.nextTick(function() {
190188
listenSocket.close();
191189
});
192190
}

0 commit comments

Comments
 (0)