From bfcad47ab1e8045f4a6c3bb7bb2af6e232563110 Mon Sep 17 00:00:00 2001 From: "Pooja D.P" Date: Tue, 25 Aug 2020 07:00:31 +0000 Subject: [PATCH 1/3] code:commom.mustCall() is added for the callbacks net.createServer() and server.listen() --- test/sequential/test-net-response-size.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/sequential/test-net-response-size.js b/test/sequential/test-net-response-size.js index c5d7e9b600e05d..0a38a851af8a6f 100644 --- a/test/sequential/test-net-response-size.js +++ b/test/sequential/test-net-response-size.js @@ -32,7 +32,7 @@ const cp = require('child_process'); if (process.argv[2] === 'server') { // Server - const server = net.createServer(function(conn) { + const server = net.createServer(common.mustCall(function(conn) { conn.on('data', function(data) { console.log(`server received ${data.length} bytes`); }); @@ -40,11 +40,11 @@ if (process.argv[2] === 'server') { conn.on('close', function() { server.close(); }); - }); + })); - server.listen(common.PORT, '127.0.0.1', function() { + server.listen(common.PORT, '127.0.0.1', common.mustCall(() { console.log('Server running.'); - }); + })); } else { // Client From 79a7ea65bfeccec987aa5284bd03937d3662d45d Mon Sep 17 00:00:00 2001 From: "Pooja D.P" Date: Tue, 25 Aug 2020 07:23:40 +0000 Subject: [PATCH 2/3] code:syntax error cleared --- test/sequential/test-net-response-size.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sequential/test-net-response-size.js b/test/sequential/test-net-response-size.js index 0a38a851af8a6f..e92c1276f0d1d2 100644 --- a/test/sequential/test-net-response-size.js +++ b/test/sequential/test-net-response-size.js @@ -42,7 +42,7 @@ if (process.argv[2] === 'server') { }); })); - server.listen(common.PORT, '127.0.0.1', common.mustCall(() { + server.listen(common.PORT, '127.0.0.1', common.mustCall(()=> { console.log('Server running.'); })); From 67f127863231751cb7f87a08c569d70139f832c2 Mon Sep 17 00:00:00 2001 From: "Pooja D.P" Date: Tue, 25 Aug 2020 08:28:02 +0000 Subject: [PATCH 3/3] code: common.mustcall() modified Please enter the commit message for your changes. Lines starting --- test/sequential/test-net-response-size.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sequential/test-net-response-size.js b/test/sequential/test-net-response-size.js index e92c1276f0d1d2..6b83544dc2c165 100644 --- a/test/sequential/test-net-response-size.js +++ b/test/sequential/test-net-response-size.js @@ -42,7 +42,7 @@ if (process.argv[2] === 'server') { }); })); - server.listen(common.PORT, '127.0.0.1', common.mustCall(()=> { + server.listen(common.PORT, '127.0.0.1', common.mustCall(function() { console.log('Server running.'); }));