diff options
author | Valery Piashchynski <[email protected]> | 2023-08-15 14:24:43 +0200 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2023-08-15 14:24:43 +0200 |
commit | 80f25698ba5563202ae48078a5c9fe71c1b42b5d (patch) | |
tree | 4992317d90ef5262f505e550ade1ff4c96872541 /internal | |
parent | 00d24df903004641c739f83e755cf1800c3c81a4 (diff) |
chore: update config tests
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'internal')
-rw-r--r-- | internal/sdnotify/sdnotify.go | 14 |
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 + } } } }() |