summaryrefslogtreecommitdiff
path: root/lib/cluster.js
diff options
context:
space:
mode:
authorSam Roberts <sam@strongloop.com>2015-02-14 18:50:56 -0800
committerSam Roberts <sam@strongloop.com>2015-07-23 14:51:10 -0700
commit66fc8ca22b05036f88cf457873332e67f5b576b2 (patch)
tree4d30e599d35ca62b0a8ebbab0b5df88c8839d790 /lib/cluster.js
parente11fc67225821c76d35a483690b952b01f1f7c67 (diff)
downloadnode-new-66fc8ca22b05036f88cf457873332e67f5b576b2.tar.gz
cluster: emit 'message' event on cluster master
For consistency with the worker 'exit', 'online', 'disconnect', and 'listening' events which are emitted on worker and cluster, also emit 'message' on cluster. Reviewed-by: Sam Roberts <vieuxtech@gmail.com> Reviewed-by: Christian Tellnes <christian@tellnes.no> Reviewed-by: Stephen Belanger <admin@stephenbelanger.com> PR-URL: https://github.com/nodejs/io.js/pull/861
Diffstat (limited to 'lib/cluster.js')
-rw-r--r--lib/cluster.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/cluster.js b/lib/cluster.js
index bb4b60a2fc..bcde4ce1fa 100644
--- a/lib/cluster.js
+++ b/lib/cluster.js
@@ -319,6 +319,8 @@ function masterInit() {
process: workerProcess
});
+ worker.on('message', this.emit.bind(this, 'message'));
+
function removeWorker(worker) {
assert(worker);