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.
pull/2088/head
Simon Gaeremynck 2014-02-19 10:48:15 +00:00
parent ca8dce1840
commit cfdd57b487
1 changed files with 2 additions and 0 deletions

View File

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