Skip to content

Commit

Permalink
test: add mustCall to net-can-reset-timeout
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
heartAndRain authored and targos committed Apr 29, 2019
1 parent 9fa5ba8 commit 7d80999
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/parallel/test-net-can-reset-timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -54,4 +54,4 @@ server.listen(0, function() {
console.log('client side end');
server.close();
});
});
}));

0 comments on commit 7d80999

Please sign in to comment.