From 61776033c2df233c520fe55783058ee724c936a1 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Fri, 12 May 2023 10:58:52 +0300 Subject: [PATCH] [#39] ir: Do not reload services if they are disabled Signed-off-by: Evgenii Stratonikov --- cmd/frostfs-ir/httpcomponent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/frostfs-ir/httpcomponent.go b/cmd/frostfs-ir/httpcomponent.go index d3cda8930..d73160a1d 100644 --- a/cmd/frostfs-ir/httpcomponent.go +++ b/cmd/frostfs-ir/httpcomponent.go @@ -66,7 +66,7 @@ func (c *httpComponent) reload() { enabled := cfg.GetBool(c.enabledKey) address := cfg.GetString(c.addressKey) dur := cfg.GetDuration(c.shutdownTimeoutKey) - if enabled != c.enabled || address != c.address || dur != c.shutdownDur { + if enabled != c.enabled || enabled && (address != c.address || dur != c.shutdownDur) { log.Info(fmt.Sprintf("%s config updated", c.name)) if err := c.shutdown(); err != nil { log.Debug(logs.FrostFSIRCouldNotShutdownHTTPServer,