Remove GC collection from redbean SQLite session

The behavior of sqlite3session_delete is undefined after the DB
connection is closed, so we need to avoid calling it from gc handler.
This commit is contained in:
Paul Kulchenko 2023-02-20 09:12:59 -08:00
parent 46e305a0db
commit da559c6e59

View file

@ -2228,10 +2228,6 @@ static int lsession_delete(lua_State *L) {
return 0;
}
static int lsession_gc(lua_State *L) {
return lsession_delete(L);
}
static int lsession_tostring(lua_State *L) {
char buff[32];
lsession *lses = lsqlite_getsession(L, 1);
@ -2736,7 +2732,6 @@ static const luaL_Reg seslib[] = {
{"delete", lsession_delete },
{"__tostring", lsession_tostring },
{"__gc", lsession_gc },
{NULL, NULL}
};