[#39] ir: Do not reload services if they are disabled
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
14c35d776e
commit
61776033c2
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ func (c *httpComponent) reload() {
|
||||||
enabled := cfg.GetBool(c.enabledKey)
|
enabled := cfg.GetBool(c.enabledKey)
|
||||||
address := cfg.GetString(c.addressKey)
|
address := cfg.GetString(c.addressKey)
|
||||||
dur := cfg.GetDuration(c.shutdownTimeoutKey)
|
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))
|
log.Info(fmt.Sprintf("%s config updated", c.name))
|
||||||
if err := c.shutdown(); err != nil {
|
if err := c.shutdown(); err != nil {
|
||||||
log.Debug(logs.FrostFSIRCouldNotShutdownHTTPServer,
|
log.Debug(logs.FrostFSIRCouldNotShutdownHTTPServer,
|
||||||
|
|
Loading…
Reference in a new issue