From 82c096bc60b363ac2061f647cc524e3fa517b53e Mon Sep 17 00:00:00 2001 From: Chelsea Holland Komlo Date: Fri, 10 Aug 2018 13:08:13 -0400 Subject: [PATCH] skip update checking if DisableUpdateCheck is set to true --- command/agent/command.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/command/agent/command.go b/command/agent/command.go index 963c5b2be7a..5eb00f709bb 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -393,8 +393,9 @@ func (c *Command) setupAgent(config *Config, logOutput io.Writer, inmem *metrics } c.httpServer = http - // Setup update checking - if config.DisableUpdateCheck != nil && *config.DisableUpdateCheck { + // If DisableUpdateCheck is not enabled, set up update checking + // (DisableUpdateCheck is false by default) + if config.DisableUpdateCheck != nil && !*config.DisableUpdateCheck { version := config.Version.Version if config.Version.VersionPrerelease != "" { version += fmt.Sprintf("-%s", config.Version.VersionPrerelease)