Addressed a potential never finishing forEach in PadMessageHandler.padUsers

If the session info for a client would be null or undefined, the forEach
callback would never get called which means the padUsers callback would
never get trigged. This could potentially block API request as this function
is exposed at an HTTP API endpoint.
This commit is contained in:
Simon Gaeremynck 2014-02-19 10:48:15 +00:00
parent ca8dce1840
commit cfdd57b487

View file

@ -1570,6 +1570,8 @@ exports.padUsers = function (padID, callback) {
result.push(author);
callback();
});
} else {
callback();
}
}, function(err) {
if(ERR(err, callback)) return;