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 6aa797d

Browse filesBrowse files
lpincaRafaelGSS
authored andcommitted
test: remove unneeded listeners
Unhandled `'error'` events will make the process exit with an unclean exit code anyway. PR-URL: #55486 Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
1 parent d3be3da commit 6aa797d
Copy full SHA for 6aa797d

File tree

Expand file treeCollapse file tree

6 files changed

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

6 files changed

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

‎test/parallel/test-child-process-dgram-reuseport.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-dgram-reuseport.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ const socket = dgram.createSocket(options);
3232

3333
socket.bind(+process.env.port, common.mustCall(() => {
3434
socket.close();
35-
})).on('error', common.mustNotCall());
35+
}));
Collapse file

‎test/parallel/test-child-process-net-reuseport.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-net-reuseport.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ const server = net.createServer();
3232

3333
server.listen({ ...options, port: +process.env.port }, common.mustCall(() => {
3434
server.close();
35-
})).on('error', common.mustNotCall());
35+
}));
Collapse file

‎test/parallel/test-cluster-dgram-reuseport.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-cluster-dgram-reuseport.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ socket1.bind(0, () => {
3535
socket2.bind(socket1.address().port, () => {
3636
socket1.close(close);
3737
socket2.close(close);
38-
}).on('error', common.mustNotCall());
39-
}).on('error', common.mustNotCall());
38+
});
39+
});
Collapse file

‎test/parallel/test-cluster-net-reuseport.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-cluster-net-reuseport.js
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,3 @@ server1.listen(options, common.mustCall(() => {
3636
server2.close(close);
3737
}));
3838
}));
39-
40-
server1.on('error', common.mustNotCall());
41-
server2.on('error', common.mustNotCall());
Collapse file

‎test/parallel/test-dgram-reuseport.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-dgram-reuseport.js
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ function test() {
1212
socket2.close();
1313
}));
1414
}));
15-
socket1.on('error', common.mustNotCall());
16-
socket2.on('error', common.mustNotCall());
1715
}
1816

1917
checkSupportReusePort().then(test, () => {
Collapse file

‎test/parallel/test-net-reuseport.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-net-reuseport.js
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ function test(host) {
1313
server2.close();
1414
}));
1515
}));
16-
server1.on('error', common.mustNotCall());
17-
server2.on('error', common.mustNotCall());
1816
}
1917

2018
checkSupportReusePort()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.