From 879d75785078478e099782ef5b4404ba4f2458d2 Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Mon, 20 Jan 2020 08:40:15 +0100 Subject: [PATCH] lib/syncthing: Wait for actual termination on Stop() (#6277) --- lib/syncthing/syncthing.go | 1 + 1 file changed, 1 insertion(+) 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 }