Don't perform wake up procedure if stopped in less than 60 seconds
This commit is contained in:
parent
9aa0b3fe29
commit
25fbee5a57
2
main.go
2
main.go
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user