Skip to content

Commit 96e8b98

Browse files
cjihrigtargos
authored andcommitted
doc: clean up isDead() example
This commit removes extra whitespace and some awkward text containing typos from the cluster worker.isDead() code sample. PR-URL: #28421 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 0fd6524 commit 96e8b98

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

doc/api/cluster.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,19 +401,14 @@ if (cluster.isMaster) {
401401
cluster.on('exit', (worker, code, signal) => {
402402
console.log('worker is dead:', worker.isDead());
403403
});
404-
405404
} else {
406-
// Workers can share any TCP connection
407-
// In this case it is an HTTP server
405+
// Workers can share any TCP connection. In this case, it is an HTTP server.
408406
http.createServer((req, res) => {
409407
res.writeHead(200);
410408
res.end(`Current process\n ${process.pid}`);
411409
process.kill(process.pid);
412410
}).listen(8000);
413-
414-
// Make http://localhost:8000 to ckeck isDead method.
415411
}
416-
417412
```
418413

419414
### worker.kill([signal='SIGTERM'])

0 commit comments

Comments
 (0)