Actually log timeout
This commit is contained in:
parent
9db21cb15d
commit
631bec38d0
@ -197,6 +197,7 @@ func ActionServe(c *cli.Context) error {
|
|||||||
loggers.rootLogger.Warnw("Unable to connect to NOTIFY_SOCKET to notify watchdog.", "error", err)
|
loggers.rootLogger.Warnw("Unable to connect to NOTIFY_SOCKET to notify watchdog.", "error", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
loggers.rootLogger.Debug("Sent WATCHDOG=1 to NOTIFY_SOCKET.")
|
||||||
|
|
||||||
// Setup timer
|
// Setup timer
|
||||||
timeout, err := daemon.SdWatchdogEnabled(false)
|
timeout, err := daemon.SdWatchdogEnabled(false)
|
||||||
@ -204,10 +205,8 @@ func ActionServe(c *cli.Context) error {
|
|||||||
loggers.rootLogger.Warnw("Unable to connect to NOTIFY_SOCKET to get watchdog timeout.", "error", err)
|
loggers.rootLogger.Warnw("Unable to connect to NOTIFY_SOCKET to get watchdog timeout.", "error", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if timeout < 0 {
|
loggers.rootLogger.Debugw("Got invalid watchdog timeout", "timeout", timeout)
|
||||||
loggers.rootLogger.Debugw("Got invalid watchdog timeout", "timeout", timeout)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
ticker := time.NewTicker(timeout / 2)
|
ticker := time.NewTicker(timeout / 2)
|
||||||
for {
|
for {
|
||||||
healthy := s.IsHealthy()
|
healthy := s.IsHealthy()
|
||||||
|
Loading…
Reference in New Issue
Block a user