When there is just one session and this one is invalid SecurityManager.checkAccess would cause the request to hang forever because the callback is omitted for each invalid session, this fixes this issue.

validSession still remains false so this does not cause issues further down.
pull/1689/head
mluto 2013-03-31 10:27:21 +02:00
parent 9c36d6f58b
commit 30cae9097f
1 changed files with 5 additions and 1 deletions

View File

@ -131,7 +131,11 @@ exports.checkAccess = function (padID, sessionCookie, token, password, callback)
sessionManager.getSessionInfo(sessionID, function(err, sessionInfo)
{
//skip session if it doesn't exist
if(err && err.message == "sessionID does not exist") return;
if(err && err.message == "sessionID does not exist")
{
callback();
return;
}
if(ERR(err, callback)) return;