test: add mustCall to net-can-reset-timeout
PR-URL: https://github.com/nodejs/node/pull/27462 Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
54c973cee7
commit
2c7b5332d6
@ -37,13 +37,13 @@ const server = net.createServer(common.mustCall(function(stream) {
|
||||
stream.write('WHAT.');
|
||||
}));
|
||||
|
||||
stream.on('end', function() {
|
||||
stream.on('end', common.mustCall(function() {
|
||||
console.log('server side end');
|
||||
stream.end();
|
||||
});
|
||||
}));
|
||||
}));
|
||||
|
||||
server.listen(0, function() {
|
||||
server.listen(0, common.mustCall(function() {
|
||||
const c = net.createConnection(this.address().port);
|
||||
|
||||
c.on('data', function() {
|
||||
@ -54,4 +54,4 @@ server.listen(0, function() {
|
||||
console.log('client side end');
|
||||
server.close();
|
||||
});
|
||||
});
|
||||
}));
|
||||
|
Loading…
x
Reference in New Issue
Block a user