diff --git a/lib/syncthing/syncthing.go b/lib/syncthing/syncthing.go index 99fc23132..205ff7bee 100644 --- a/lib/syncthing/syncthing.go +++ b/lib/syncthing/syncthing.go @@ -404,6 +404,7 @@ func (a *App) stopWithErr(stopReason ExitStatus, err error) ExitStatus { a.err = err close(a.stop) }) + <-a.stopped return a.exitStatus }