| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0fd6524 commit 96e8b98
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -401,19 +401,14 @@ if (cluster.isMaster) { | |||
| 401 | 401 | cluster.on('exit', (worker, code, signal) => { | |
| 402 | 402 | console.log('worker is dead:', worker.isDead()); | |
| 403 | 403 | }); | |
| 404 | - | ||
| 405 | 404 | } 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. | ||
| 408 | 406 | http.createServer((req, res) => { | |
| 409 | 407 | res.writeHead(200); | |
| 410 | 408 | res.end(`Current process\n ${process.pid}`); | |
| 411 | 409 | process.kill(process.pid); | |
| 412 | 410 | }).listen(8000); | |
| 413 | - | ||
| 414 | - // Make http://localhost:8000 to ckeck isDead method. | ||
| 415 | 411 | } | |
| 416 | - | ||
| 417 | 412 | ``` | |
| 418 | 413 | ||
| 419 | 414 | ### worker.kill([signal='SIGTERM']) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments