Reset session correctly

Sometimes logging in doesn't work correctly, fix it.
This commit is contained in:
Robin Malley 2021-09-12 01:53:06 +00:00
parent 6398e97498
commit 9dcc743199
1 changed files with 1 additions and 0 deletions

View File

@ -30,6 +30,7 @@ function session.get(req)
} }
local err = util.do_sql(stmnt_get_session) local err = util.do_sql(stmnt_get_session)
if err ~= sql.ROW then if err ~= sql.ROW then
stmnt_get_session:reset()
return nil, "No such session by logged in users" return nil, "No such session by logged in users"
end end
local data = stmnt_get_session:get_values() local data = stmnt_get_session:get_values()