Add pause before restart after standby
This commit is contained in:
parent
66432672b3
commit
85dba25246
@ -1130,7 +1130,14 @@ func standbyMonitor() {
|
|||||||
time.Sleep(10 * time.Second)
|
time.Sleep(10 * time.Second)
|
||||||
if time.Since(now) > 2*time.Minute {
|
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.")
|
||||||
|
|
||||||
|
// 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)
|
||||||
|
|
||||||
restart()
|
restart()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
now = time.Now()
|
now = time.Now()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user