Selaa lähdekoodia

:bug: Save conf lock

Daniel 2 vuotta sitten
vanhempi
commit
6fa4245819
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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")