From 828bbc407ffbc33640a186e93a53778cbc88454c Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius Date: Wed, 8 Oct 2014 21:28:47 +0100 Subject: [PATCH] Restarting monitor process is still considered a restart (fixes #809) --- cmd/syncthing/monitor.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/syncthing/monitor.go b/cmd/syncthing/monitor.go index 5fdffbea4..e25689d16 100644 --- a/cmd/syncthing/monitor.go +++ b/cmd/syncthing/monitor.go @@ -78,6 +78,10 @@ func monitorMain() { l.Fatalln(err) } + // Let the next child process know that this is not the first time + // it's starting up. + os.Setenv("STRESTART", "yes") + stdoutMut.Lock() stdoutFirstLines = make([]string, 0, 10) stdoutLastLines = make([]string, 0, 50) @@ -123,10 +127,6 @@ func monitorMain() { l.Infoln("Syncthing exited:", err) time.Sleep(1 * time.Second) - - // Let the next child process know that this is not the first time - // it's starting up. - os.Setenv("STRESTART", "yes") } }