From 5d4655caa4c2d4ab10564bce7955623cc0301048 Mon Sep 17 00:00:00 2001 From: Nimit Aggarwal Date: Mon, 2 Sep 2019 13:22:19 +0530 Subject: [PATCH] doc: exitedAfterDisconnect value can be false Fixed the documentation to reflect the changes in the default value of worker.exitedAfterDisconnect PR-URL: https://github.com/nodejs/node/pull/29404 Fixes: https://github.com/nodejs/node/issues/28837 Refs: https://github.com/nodejs/node/pull/3743 Reviewed-By: David Carlier Reviewed-By: Anto Aravinth --- doc/api/cluster.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/api/cluster.md b/doc/api/cluster.md index 979ddac5b9223d..06f730e3ae66a5 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -336,7 +336,9 @@ added: v6.0.0 * {boolean} -Set by calling `.kill()` or `.disconnect()`. Until then, it is `undefined`. +This property is `true` if the worker exited due to `.kill()` or +`.disconnect()`. If the worker exited any other way, it is `false`. If the +worker has not exited, it is `undefined`. The boolean [`worker.exitedAfterDisconnect`][] allows distinguishing between voluntary and accidental exit, the master may choose not to respawn a worker