Explorar o código

:bug: Save conf lock

Daniel %!s(int64=2) %!d(string=hai) anos
pai
achega
6fa4245819
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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")