From deacd8bae67da1bb1543b5d7c85cc221beb394fa Mon Sep 17 00:00:00 2001 From: yorkie Date: Mon, 2 May 2016 16:36:11 +0800 Subject: [PATCH 1/2] doc,cluster: fix the lint of an example --- doc/api/cluster.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/cluster.md b/doc/api/cluster.md index dcf2f8a1e92f85..7e20388a3bad87 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -140,9 +140,9 @@ Similar to the `cluster.on('exit')` event, but specific to this worker. ```js const worker = cluster.fork(); worker.on('exit', (code, signal) => { - if( signal ) { + if (signal) { console.log(`worker was killed by signal: ${signal}`); - } else if( code !== 0 ) { + } else if (code !== 0) { console.log(`worker exited with error code: ${code}`); } else { console.log('worker success!'); From 414cf54286d664d05e6813c866a5e53ffe05c7a7 Mon Sep 17 00:00:00 2001 From: yorkie Date: Mon, 2 May 2016 16:44:28 +0800 Subject: [PATCH 2/2] fix nits --- doc/api/cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/cluster.md b/doc/api/cluster.md index 7e20388a3bad87..2a08bfa2485cd5 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -285,7 +285,7 @@ if (cluster.isMaster) { server.listen(8000); process.on('message', (msg) => { - if(msg === 'shutdown') { + if (msg === 'shutdown') { // initiate graceful close of any connections to server } });