diff --git a/src/database/redis.js b/src/database/redis.js index 27394f7463..c8c420a3ee 100644 --- a/src/database/redis.js +++ b/src/database/redis.js @@ -60,9 +60,9 @@ var meta = require('../meta'); var sessionStore = require('connect-redis')(session); - var ttlDays = 1000 * 60 * 60 * 24 * (parseInt(meta.config.loginDays, 10) || 0); - var ttlSeconds = 1000 * (parseInt(meta.config.loginSeconds, 10) || 0); - var ttl = ttlSeconds || ttlDays || 1209600000; // Default to 14 days + var ttlDays = 60 * 60 * 24 * (parseInt(meta.config.loginDays, 10) || 0); + var ttlSeconds = (parseInt(meta.config.loginSeconds, 10) || 0); + var ttl = ttlSeconds || ttlDays || 1209600; // Default to 14 days module.sessionStore = new sessionStore({ client: module.client,