summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/sdnotify/sdnotify.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/internal/sdnotify/sdnotify.go b/internal/sdnotify/sdnotify.go
index d88c0e88..114284ee 100644
--- a/internal/sdnotify/sdnotify.go
+++ b/internal/sdnotify/sdnotify.go
@@ -96,7 +96,19 @@ func StartWatchdog(interval int, stopCh chan struct{}) {
case <-stopCh:
return
case <-ticker.C:
- _, _ = SdNotify(Watchdog)
+ supported, err := SdNotify(Watchdog)
+ if err != nil {
+ // notification supported, but failure happened, retry
+ continue
+ }
+ // notification not supported, stop
+ if !supported && err == nil {
+ return
+ }
+ // notification supported, data has been sent, continue
+ if supported && err == nil {
+ continue
+ }
}
}
}()