Skip to content

Commit

Permalink
Remove a Node.js pre-v6 compatibility bit
Browse files Browse the repository at this point in the history
  • Loading branch information
zbjornson committed Jan 31, 2019
1 parent 281b80e commit 8f51444
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,7 @@ function addListeners() {

if (cluster.isMaster) {
// Listen for worker responses to requests for local metrics
cluster.on('message', function(worker, message) {
if (arguments.length === 2) {
// pre-Node.js v6.0
message = worker;
worker = undefined;
}

cluster.on('message', (worker, message) => {
if (message.type === GET_METRICS_RES) {
const request = requests.get(message.requestId);
message.metrics.forEach(registry => request.responses.push(registry));
Expand Down

0 comments on commit 8f51444

Please sign in to comment.