From 6af160ee560d43f574ab017df7df4baca3fd8ded Mon Sep 17 00:00:00 2001 From: mluto Date: Fri, 29 Mar 2013 10:09:39 +0100 Subject: [PATCH] Fix #1519: don't error in listSessionsOfGroup when there are non-existing sessions (by eldiddio) --- src/node/db/SessionManager.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/node/db/SessionManager.js b/src/node/db/SessionManager.js index 60e0a7ac9..571ea07bf 100644 --- a/src/node/db/SessionManager.js +++ b/src/node/db/SessionManager.js @@ -347,7 +347,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(); });