summaryrefslogtreecommitdiff
path: root/src/node/db/SessionManager.js
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2014-11-15 16:25:23 +0000
committerJohn McLear <john@mclear.co.uk>2014-11-15 16:25:23 +0000
commit865829e159bef4379a9549fdb7737dd797be2300 (patch)
tree8ae2b0827ce4d4debf5ba2ca84d5f4586adfb907 /src/node/db/SessionManager.js
parentfc79c8a29812ae96c5c3eea32091e0b71d778338 (diff)
parent6af160ee560d43f574ab017df7df4baca3fd8ded (diff)
downloadetherpad-lite-865829e159bef4379a9549fdb7737dd797be2300.zip
Merge pull request #1682 from luto/fix-listSessionsOfGroup
Don't error in listSessionsOfGroup when there are non-existing sessions
Diffstat (limited to 'src/node/db/SessionManager.js')
-rw-r--r--src/node/db/SessionManager.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/node/db/SessionManager.js b/src/node/db/SessionManager.js
index 71315adc..f8000e47 100644
--- a/src/node/db/SessionManager.js
+++ b/src/node/db/SessionManager.js
@@ -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();
});