From 87794ee634023524c03614024e8f98d3f3ceb3d8 Mon Sep 17 00:00:00 2001 From: = Date: Sat, 6 Nov 2021 01:36:01 +0100 Subject: [PATCH] Fix watchdog --- cmd/apiary.go | 6 ++++-- version.go | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/apiary.go b/cmd/apiary.go index baa610c..cc543fc 100644 --- a/cmd/apiary.go +++ b/cmd/apiary.go @@ -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) diff --git a/version.go b/version.go index ba27e0d..29d2406 100644 --- a/version.go +++ b/version.go @@ -5,7 +5,7 @@ import ( "runtime" ) -var Version = "v0.1.22" +var Version = "v0.1.23" var Build string func FullVersion() string {