Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 28db999

Browse filesBrowse files
tniessentargos
authored andcommitted
doc: remove incorrect and outdated example
PR-URL: #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>
1 parent c2108d4 commit 28db999
Copy full SHA for 28db999

File tree

Expand file treeCollapse file tree

1 file changed

+0
-18
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-18
lines changed
Open diff view settings
Collapse file

‎doc/api/cluster.md‎

Copy file name to clipboardExpand all lines: doc/api/cluster.md
-18Lines changed: 0 additions & 18 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.