diff options
author | John McLear <john@mclear.co.uk> | 2014-11-15 16:25:23 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2014-11-15 16:25:23 +0000 |
commit | 865829e159bef4379a9549fdb7737dd797be2300 (patch) | |
tree | 8ae2b0827ce4d4debf5ba2ca84d5f4586adfb907 /src/node/db/SessionManager.js | |
parent | fc79c8a29812ae96c5c3eea32091e0b71d778338 (diff) | |
parent | 6af160ee560d43f574ab017df7df4baca3fd8ded (diff) | |
download | etherpad-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.js | 10 |
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(); }); |