diff options
author | cjihrig <cjihrig@gmail.com> | 2019-06-25 15:22:02 +0300 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-06-27 16:47:36 +0300 |
commit | 63a5cd87eaf311e430e74ebadc26097fd93cc6d0 (patch) | |
tree | fef8bf403c2972cd58075f73509d82265f666d3d /doc/api/cluster.md | |
parent | 94454927f697840a25c1ae73ebbcf9a5324b9060 (diff) |
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: https://github.com/nodejs/node/pull/28421
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'doc/api/cluster.md')
-rw-r--r-- | doc/api/cluster.md | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/doc/api/cluster.md b/doc/api/cluster.md index a3dc1239aa8..83a541d6554 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -401,19 +401,14 @@ if (cluster.isMaster) { cluster.on('exit', (worker, code, signal) => { console.log('worker is dead:', worker.isDead()); }); - } else { - // Workers can share any TCP connection - // In this case it is an HTTP server + // Workers can share any TCP connection. In this case, it is an HTTP server. http.createServer((req, res) => { res.writeHead(200); res.end(`Current process\n ${process.pid}`); process.kill(process.pid); }).listen(8000); - - // Make http://localhost:8000 to ckeck isDead method. } - ``` ### worker.kill([signal='SIGTERM']) |