From 4ae3d75f8c831600f58517f5d575fd48ac03996d Mon Sep 17 00:00:00 2001 From: Nimit Aggarwal Date: Mon, 2 Sep 2019 13:22:19 +0530 Subject: [PATCH 1/3] doc: exitedAfterDisconnect value can be false Fixed the documentation to reflect the changes in the default value of worker.exitedAfterDisconnect Fixes: https://github.com/nodejs/node/issues/28837 Refs: https://github.com/nodejs/node/pull/3743 --- doc/api/cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/cluster.md b/doc/api/cluster.md index fb7328aa4d730b..8b99034058edeb 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -336,7 +336,7 @@ added: v6.0.0 * {boolean} -Set by calling `.kill()` or `.disconnect()`. Until then, it is `undefined`. +Set by calling `.kill()` or `.disconnect()`. Until then, it is `undefined` or `false`. The boolean [`worker.exitedAfterDisconnect`][] allows distinguishing between voluntary and accidental exit, the master may choose not to respawn a worker From 3efe9848be8444d21b0a1ad5825e74344d0c82e5 Mon Sep 17 00:00:00 2001 From: Nimit Aggarwal Date: Wed, 4 Sep 2019 16:12:45 +0530 Subject: [PATCH 2/3] doc: More about the states --- doc/api/cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/cluster.md b/doc/api/cluster.md index 8b99034058edeb..0afae376962c28 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -336,7 +336,7 @@ added: v6.0.0 * {boolean} -Set by calling `.kill()` or `.disconnect()`. Until then, it is `undefined` or `false`. +Set by calling `.kill()` or `.disconnect()`. Until the worker has not exited the value is `undefined`, if the worker has exited in any other way the value is `false`. The boolean [`worker.exitedAfterDisconnect`][] allows distinguishing between voluntary and accidental exit, the master may choose not to respawn a worker From 2ba17db2764480a6d2ae0891a0b1d44365b517f1 Mon Sep 17 00:00:00 2001 From: Nimit Aggarwal Date: Wed, 4 Sep 2019 18:55:59 +0530 Subject: [PATCH 3/3] Update doc/api/cluster.md Co-Authored-By: Rich Trott --- 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 0afae376962c28..1e73fc70869e94 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 the worker has not exited the value is `undefined`, if the worker has exited in any other way the value is `false`. +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