Fix watchdog

This commit is contained in:
Torjus Håkestad 2021-11-06 01:36:01 +01:00
parent 801dc967f8
commit 87794ee634
2 changed files with 5 additions and 3 deletions

View File

@ -192,10 +192,12 @@ func ActionServe(c *cli.Context) error {
return
}
loggers.rootLogger.Debug("Sent WATCHDOG_USEC=10000000 to NOTIFY_SOCKET.")
if _, err := daemon.SdNotify(false, "WATCHDOG_USEC=10000000"); err != nil {
loggers.rootLogger.Warnw("Unable to connect to NOTIFY_SOCKET to set watchdog timeout.", "error", err)
if _, err := daemon.SdNotify(false, daemon.SdNotifyWatchdog); err != nil {
loggers.rootLogger.Warnw("Unable to connect to NOTIFY_SOCKET to notify watchdog.", "error", err)
return
}
// Setup timer
timeout, err := daemon.SdWatchdogEnabled(false)
if err != nil {
loggers.rootLogger.Warnw("Unable to connect to NOTIFY_SOCKET to get watchdog timeout.", "error", err)

View File

@ -5,7 +5,7 @@ import (
"runtime"
)
var Version = "v0.1.22"
var Version = "v0.1.23"
var Build string
func FullVersion() string {