From db868ed29dffba58fa01339c21c949347f6ee16c Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Thu, 11 Sep 2014 20:25:08 +0200 Subject: [PATCH] Increase restart delay to 60s --- cmd/syncthing/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index 65290c36..da577afd 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -1127,16 +1127,17 @@ func overrideGUIConfig(originalCfg config.GUIConfiguration, address, authenticat } func standbyMonitor() { + restartDelay := time.Duration(60 * time.Second) now := time.Now() for { time.Sleep(10 * time.Second) if time.Since(now) > 2*time.Minute { - l.Infoln("Paused state detected, possibly woke up from standby.") + l.Infoln("Paused state detected, possibly woke up from standby. Restarting in", restartDelay) // We most likely just woke from standby. If we restart // immediately chances are we won't have networking ready. Give // things a moment to stabilize. - time.Sleep(10 * time.Second) + time.Sleep(restartDelay) restart() return