Skip to content

Commit e4ab6fc

Browse files
tniessentargos
authored andcommitted
doc: remove incorrect and outdated example
PR-URL: #30138 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 3c23224 commit e4ab6fc

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

doc/api/cluster.md

-18
Original file line numberDiff line numberDiff line change
@@ -613,24 +613,6 @@ Emitted when the cluster master receives a message from any worker.
613613

614614
See [`child_process` event: `'message'`][].
615615

616-
Before Node.js v6.0, this event emitted only the message and the handle,
617-
but not the worker object, contrary to what the documentation stated.
618-
619-
If support for older versions is required but a worker object is not
620-
required, it is possible to work around the discrepancy by checking the
621-
number of arguments:
622-
623-
```js
624-
cluster.on('message', (worker, message, handle) => {
625-
if (arguments.length === 2) {
626-
handle = message;
627-
message = worker;
628-
worker = undefined;
629-
}
630-
// ...
631-
});
632-
```
633-
634616
## Event: 'online'
635617
<!-- YAML
636618
added: v0.7.0

0 commit comments

Comments
 (0)