Skip to content

Commit 7d80999

Browse files
heartAndRaintargos
authored andcommitted
test: add mustCall to net-can-reset-timeout
PR-URL: #27462 Reviewed-By: Weijia Wang <[email protected]> Reviewed-By: Yorkie Liu <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 9fa5ba8 commit 7d80999

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/parallel/test-net-can-reset-timeout.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ const server = net.createServer(common.mustCall(function(stream) {
3737
stream.write('WHAT.');
3838
}));
3939

40-
stream.on('end', function() {
40+
stream.on('end', common.mustCall(function() {
4141
console.log('server side end');
4242
stream.end();
43-
});
43+
}));
4444
}));
4545

46-
server.listen(0, function() {
46+
server.listen(0, common.mustCall(function() {
4747
const c = net.createConnection(this.address().port);
4848

4949
c.on('data', function() {
@@ -54,4 +54,4 @@ server.listen(0, function() {
5454
console.log('client side end');
5555
server.close();
5656
});
57-
});
57+
}));

0 commit comments

Comments
 (0)