From d8c2990ffd4840939fc2393225fec5077f06e560 Mon Sep 17 00:00:00 2001 From: jdl Date: Tue, 16 Jun 2026 07:55:46 +0200 Subject: [PATCH] Audit fixes --- hub/api/api.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hub/api/api.go b/hub/api/api.go index 73a14fd..2f1e2ea 100644 --- a/hub/api/api.go +++ b/hub/api/api.go @@ -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)) }