diff --git a/doc/api/cluster.md b/doc/api/cluster.md index c7d8359ac0ce93..721b33a7e184f1 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -451,40 +451,6 @@ if (cluster.isMaster) { } ``` -### worker.suicide - - -> Stability: 0 - Deprecated: Use [`worker.exitedAfterDisconnect`][] instead. - -An alias to [`worker.exitedAfterDisconnect`][]. - -Set by calling `.kill()` or `.disconnect()`. Until then, it is `undefined`. - -The boolean `worker.suicide` is used to distinguish between voluntary -and accidental exit, the master may choose not to respawn a worker based on -this value. - -```js -cluster.on('exit', (worker, code, signal) => { - if (worker.suicide === true) { - console.log('Oh, it was just voluntary – no need to worry'); - } -}); - -// kill worker -worker.kill(); -``` - -This API only exists for backwards compatibility and will be removed in the -future. - ## Event: 'disconnect'