Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calls to async.applyEachSeries must include an explicit callback #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 42 additions & 6 deletions scserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,13 @@ SCServer.prototype._passThroughMiddleware = function (options, cb) {
}
cb(err, eventData);
}
}
},
// If this callback function isn't provided, async.applyEachSeries
// will treat the previous argument (meant to be the next function
// passed to the middleware) as if it were the callback, and the
// middleware will be unfairly deprived of its next function
// (causing exceptions on calls to next() because next is undefined).
() => {}
);
}
} else if (event == '#publish') {
Expand Down Expand Up @@ -784,7 +790,13 @@ SCServer.prototype._passThroughMiddleware = function (options, cb) {
});
}
}
}
},
// If this callback function isn't provided, async.applyEachSeries
// will treat the previous argument (meant to be the next function
// passed to the middleware) as if it were the callback, and the
// middleware will be unfairly deprived of its next function
// (causing exceptions on calls to next() because next is undefined).
() => {}
);
} else {
var noPublishError = new InvalidActionError('Client publish feature is disabled');
Expand Down Expand Up @@ -814,7 +826,13 @@ SCServer.prototype._passThroughMiddleware = function (options, cb) {
}
cb(err, request.data);
}
}
},
// If this callback function isn't provided, async.applyEachSeries
// will treat the previous argument (meant to be the next function
// passed to the middleware) as if it were the callback, and the
// middleware will be unfairly deprived of its next function
// (causing exceptions on calls to next() because next is undefined).
() => {}
);
}
};
Expand Down Expand Up @@ -847,7 +865,13 @@ SCServer.prototype._passThroughAuthenticateMiddleware = function (options, cb) {
}
cb(err, isBadToken);
}
}
},
// If this callback function isn't provided, async.applyEachSeries
// will treat the previous argument (meant to be the next function
// passed to the middleware) as if it were the callback, and the
// middleware will be unfairly deprived of its next function
// (causing exceptions on calls to next() because next is undefined).
() => {}
);
};

Expand Down Expand Up @@ -880,7 +904,13 @@ SCServer.prototype._passThroughHandshakeSCMiddleware = function (options, cb) {
}
cb(err, statusCode);
}
}
},
// If this callback function isn't provided, async.applyEachSeries
// will treat the previous argument (meant to be the next function
// passed to the middleware) as if it were the callback, and the
// middleware will be unfairly deprived of its next function
// (causing exceptions on calls to next() because next is undefined).
() => {}
);
};

Expand Down Expand Up @@ -918,7 +948,13 @@ SCServer.prototype.verifyOutboundEvent = function (socket, eventName, eventData,
cb(null, eventData);
}
}
}
},
// If this callback function isn't provided, async.applyEachSeries
// will treat the previous argument (meant to be the next function
// passed to the middleware) as if it were the callback, and the
// middleware will be unfairly deprived of its next function
// (causing exceptions on calls to next() because next is undefined).
() => {}
);
} else {
cb(null, eventData);
Expand Down