Don't perform wake up procedure if stopped in less than 60 seconds

This commit is contained in:
nemunaire 2019-11-20 16:19:03 +01:00
parent 9aa0b3fe29
commit 25fbee5a57
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ loop:
}
// Tell parent process that it can launch the wake up procedure
if time.Now().Sub(launched) < MaxRunTime {
if time.Since(launched) < MaxRunTime && time.Since(launched) > 60*time.Second {
if proc, err := os.FindProcess(os.Getppid()); err != nil {
log.Println(err)
} else if err := proc.Signal(syscall.SIGHUP); err != nil {