diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-07-12 13:44:55 +0000 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-07-12 13:44:55 +0000 |
commit | 85887a93c45b87f7791d86250a69a07c41268034 (patch) | |
tree | 4ec493c3dbc8b8b0bddd0e5c0943487d9586f7c4 | |
parent | d0175eec70debe3fbabf1869f420e92c7313c2ad (diff) | |
download | server-85887a93c45b87f7791d86250a69a07c41268034.tar.gz |
Fix session expiration.
-rw-r--r-- | connect-better-sqlite3.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/connect-better-sqlite3.js b/connect-better-sqlite3.js index 173b75d..2bfdb12 100644 --- a/connect-better-sqlite3.js +++ b/connect-better-sqlite3.js @@ -30,7 +30,7 @@ module.exports = function (session) { let db = new SQLite(db_path, options.mode); db.exec("CREATE TABLE IF NOT EXISTS "+table+" (sid PRIMARY KEY, expires INTEGER, sess TEXT)"); - db.exec("DELETE FROM "+table+" WHERE ? > expires"); + db.exec("DELETE FROM "+table+" WHERE "+now()+" > expires"); db.exec("VACUUM"); this.sql_destroy = db.prepare("DELETE FROM "+table+" WHERE sid = ?"); |