This commit is contained in:
2025-08-06 11:31:42 +03:00
parent 0c25d00171
commit e4db8505a0

View File

@@ -44,7 +44,7 @@ func getDBMutex(dbPath string) *sync.RWMutex {
return mtx return mtx
} }
func loadDBMod(llog *slog.Logger) func(*lua.LState) int { func loadDBMod(llog *slog.Logger, sid string) func(*lua.LState) int {
return func(L *lua.LState) int { return func(L *lua.LState) int {
llog.Debug("import module db-sqlite") llog.Debug("import module db-sqlite")
dbMod := L.NewTable() dbMod := L.NewTable()
@@ -85,7 +85,7 @@ func loadDBMod(llog *slog.Logger) func(*lua.LState) int {
"close": dbClose, "close": dbClose,
})) }))
L.SetField(dbMod, "__gosally_internal", lua.LString("0")) L.SetField(dbMod, "__gosally_internal", lua.LString(sid))
L.Push(dbMod) L.Push(dbMod)
return 1 return 1
} }