Audit fixes

This commit is contained in:
jdl
2026-06-16 07:55:46 +02:00
parent 32b8b0dc89
commit d8c2990ffd

View File

@@ -27,7 +27,8 @@ type API struct {
}
func New(dbPath string) (*API, error) {
sqlDB, err := sql.Open("sqlite3", dbPath+"?_journal=WAL&_foreign_keys=on")
dbPath += "?_journal=WAL&_foreign_keys=on&_busy_timeout=5000&_txlock=immediate"
sqlDB, err := sql.Open("sqlite3", dbPath)
if err != nil {
return nil, err
}
@@ -79,6 +80,8 @@ func (a *API) Config_Get() (*Config, error) {
}
func (a *API) Config_Update(conf *Config) error {
a.sessionsMu.Lock()
defer a.sessionsMu.Unlock()
return errs.DB(db.Config_Update(a.db, conf))
}