Don't start model until services have been added (fixes #1969)

This commit is contained in:
Jakob Borg
2015-06-20 20:04:47 +02:00
parent b5198d8119
commit d347e54acb
4 changed files with 18 additions and 12 deletions

View File

@@ -601,7 +601,6 @@ func syncthingMain() {
m := model.NewModel(cfg, myID, myName, "syncthing", Version, ldb)
cfg.Subscribe(m)
mainSvc.Add(m)
if t := os.Getenv("STDEADLOCKTIMEOUT"); len(t) > 0 {
it, err := strconv.Atoi(t)
@@ -634,6 +633,8 @@ func syncthingMain() {
}
}
mainSvc.Add(m)
// GUI
setupGUI(mainSvc, cfg, m, apiSub)