Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Save conf lock

Daniel6fa42458196e
diff --git a/kernel/model/conf.go b/kernel/model/conf.go
index b1b5807dfc..120eabdacc 100644
--- a/kernel/model/conf.go
+++ b/kernel/model/conf.go
@@ -554,7 +554,7 @@ func (conf *AppConf) Save() {
}
confSaveLock.Lock()
- confSaveLock.Unlock()
+ defer confSaveLock.Unlock()
newData, _ := gulu.JSON.MarshalIndentJSON(Conf, "", " ")
confPath := filepath.Join(util.ConfDir, "conf.json")