瀏覽代碼

:bug: Save conf lock

Daniel 2 年之前
父節點
當前提交
6fa4245819
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      kernel/model/conf.go

+ 1 - 1
kernel/model/conf.go

@@ -554,7 +554,7 @@ func (conf *AppConf) Save() {
 	}
 	}
 
 
 	confSaveLock.Lock()
 	confSaveLock.Lock()
-	confSaveLock.Unlock()
+	defer confSaveLock.Unlock()
 
 
 	newData, _ := gulu.JSON.MarshalIndentJSON(Conf, "", "  ")
 	newData, _ := gulu.JSON.MarshalIndentJSON(Conf, "", "  ")
 	confPath := filepath.Join(util.ConfDir, "conf.json")
 	confPath := filepath.Join(util.ConfDir, "conf.json")