소스 검색

: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.Unlock()
+	defer confSaveLock.Unlock()
 
 	newData, _ := gulu.JSON.MarshalIndentJSON(Conf, "", "  ")
 	confPath := filepath.Join(util.ConfDir, "conf.json")