0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

doc: fix the lint of an example in cluster.md

PR-URL: https://github.com/nodejs/node/pull/6516
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
yorkie 2016-05-02 16:36:11 +08:00 committed by James M Snell
parent ba6196f843
commit 8637c27b77

View File

@ -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
}
});