Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cc46d3b

Browse filesBrowse files
Trottrvagg
authored andcommitted
test: clarify 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. Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: #2062
1 parent 7118b8a commit cc46d3b
Copy full SHA for cc46d3b

File tree

Expand file treeCollapse file tree

1 file changed

+2
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-4
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/internet/test-dgram-multicast-multi-process.js
+2-4Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.