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

View File

@ -152,7 +152,7 @@ loop:
} }
// Tell parent process that it can launch the wake up procedure // 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 { if proc, err := os.FindProcess(os.Getppid()); err != nil {
log.Println(err) log.Println(err)
} else if err := proc.Signal(syscall.SIGHUP); err != nil { } else if err := proc.Signal(syscall.SIGHUP); err != nil {