doc: remove incorrect and outdated example

PR-URL: https://github.com/nodejs/node/pull/30138
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
pull/30123/head
Tobias Nießen 2019-10-26 17:03:46 -03:00
parent f185990738
commit 5783ed7667
No known key found for this signature in database
GPG Key ID: 718207F8FD156B70
1 changed files with 0 additions and 18 deletions

View File

@ -613,24 +613,6 @@ Emitted when the cluster master receives a message from any worker.
See [`child_process` event: `'message'`][].
Before Node.js v6.0, this event emitted only the message and the handle,
but not the worker object, contrary to what the documentation stated.
If support for older versions is required but a worker object is not
required, it is possible to work around the discrepancy by checking the
number of arguments:
```js
cluster.on('message', (worker, message, handle) => {
if (arguments.length === 2) {
handle = message;
message = worker;
worker = undefined;
}
// ...
});
```
## Event: 'online'
<!-- YAML
added: v0.7.0