From 63a5cd87eaf311e430e74ebadc26097fd93cc6d0 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 25 Jun 2019 08:22:02 -0400 Subject: [PATCH] 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 Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca --- doc/api/cluster.md | 7 +------ 1 file changed, 1 insertion(+), 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'])