From 8637c27b7754e2f7527e8eee9b3243ddce68f2c7 Mon Sep 17 00:00:00 2001 From: yorkie Date: Mon, 2 May 2016 16:36:11 +0800 Subject: [PATCH] doc: fix the lint of an example in cluster.md PR-URL: https://github.com/nodejs/node/pull/6516 Reviewed-By: Colin Ihrig Reviewed-By: Jeremiah Senkpiel Reviewed-By: James M Snell --- doc/api/cluster.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/cluster.md b/doc/api/cluster.md index bf0e77867a9..06ef0d94b2c 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!'); @@ -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 } });