From 8b6ec57c6147e5b784d78bc891144dd55493503d Mon Sep 17 00:00:00 2001 From: Anton Nikiforov Date: Mon, 21 Oct 2024 14:12:02 +0300 Subject: [PATCH] [#1440] sdnotify: Fix status for `RELOADING` Before: ``` RELOADING=1 MONOTONIC_USEC=17951246687 STATUS=RELOADING=1 MONOTONIC_USEC=17951246687 ``` After: ``` RELOADING=1 MONOTONIC_USEC=17951246687 STATUS=RELOADING ``` Signed-off-by: Anton Nikiforov --- pkg/util/sdnotify/sdnotify.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/util/sdnotify/sdnotify.go b/pkg/util/sdnotify/sdnotify.go index 22549bc96..bd15d0e8f 100644 --- a/pkg/util/sdnotify/sdnotify.go +++ b/pkg/util/sdnotify/sdnotify.go @@ -59,6 +59,8 @@ func FlagAndStatus(status string) error { return fmt.Errorf("clock_gettime: %w", err) } status += "\nMONOTONIC_USEC=" + strconv.FormatInt(ts.Nano()/1000, 10) + status += "\nSTATUS=RELOADING" + return Send(status) } status += "\nSTATUS=" + strings.TrimSuffix(status, "=1") return Send(status) -- 2.45.2