GeezerVison is showing github.com — doc: fix the lint of an example in cluster.md · nodejs/node@9a29b50
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api/cluster.md +3-3Lines changed: 3 additions & 3 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -140,9 +140,9 @@ Similar to the `cluster.on('exit')` event, but specific to this worker. |
140 | 140 | ```js |
141 | 141 | const worker = cluster.fork(); |
142 | 142 | worker.on('exit', (code, signal) => { |
143 | | - if( signal ) { |
| 143 | + if (signal) { |
144 | 144 | console.log(`worker was killed by signal: ${signal}`); |
145 | | - } else if( code !== 0 ) { |
| 145 | + } else if (code !== 0) { |
146 | 146 | console.log(`worker exited with error code: ${code}`); |
147 | 147 | } else { |
148 | 148 | console.log('worker success!'); |
@@ -285,7 +285,7 @@ if (cluster.isMaster) { |
285 | 285 | server.listen(8000); |
286 | 286 |
|
287 | 287 | process.on('message', (msg) => { |
288 | | - if(msg === 'shutdown') { |
| 288 | + if (msg === 'shutdown') { |
289 | 289 | // initiate graceful close of any connections to server |
290 | 290 | } |
291 | 291 | }); |
|