Merge pull request #1682 from luto/fix-listSessionsOfGroup

Don't error in listSessionsOfGroup when there are non-existing sessions
switch-to-pad
John McLear 2014-11-15 16:25:23 +00:00
commit 865829e159
1 changed files with 9 additions and 1 deletions

View File

@ -351,7 +351,15 @@ function listSessionsWithDBKey (dbkey, callback)
{
exports.getSessionInfo(sessionID, function(err, sessionInfo)
{
if(ERR(err, callback)) return;
if (err == "apierror: sessionID does not exist")
{
console.warn("Found bad session " + sessionID + " in " + dbkey + ".");
}
else if(ERR(err, callback))
{
return;
}
sessions[sessionID] = sessionInfo;
callback();
});