mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-08 10:50:28 +00:00
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:
parent
46e305a0db
commit
da559c6e59
1 changed files with 0 additions and 5 deletions
|
@ -2228,10 +2228,6 @@ static int lsession_delete(lua_State *L) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lsession_gc(lua_State *L) {
|
|
||||||
return lsession_delete(L);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int lsession_tostring(lua_State *L) {
|
static int lsession_tostring(lua_State *L) {
|
||||||
char buff[32];
|
char buff[32];
|
||||||
lsession *lses = lsqlite_getsession(L, 1);
|
lsession *lses = lsqlite_getsession(L, 1);
|
||||||
|
@ -2736,7 +2732,6 @@ static const luaL_Reg seslib[] = {
|
||||||
{"delete", lsession_delete },
|
{"delete", lsession_delete },
|
||||||
|
|
||||||
{"__tostring", lsession_tostring },
|
{"__tostring", lsession_tostring },
|
||||||
{"__gc", lsession_gc },
|
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue