From 6ff61322cd2c2f66549c9b558d14c99ac80b5a93 Mon Sep 17 00:00:00 2001 From: ale Date: Sun, 30 Dec 2018 20:50:54 +0000 Subject: [PATCH] Close the ConfigManager at end of command Fixes issue #1. --- cmd/tabacco/agent.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/tabacco/agent.go b/cmd/tabacco/agent.go index ca0396c..bab39ea 100644 --- a/cmd/tabacco/agent.go +++ b/cmd/tabacco/agent.go @@ -49,6 +49,7 @@ func (c *agentCommand) Execute(ctx context.Context, f *flag.FlagSet, args ...int log.Printf("configuration error: %v", err) return subcommands.ExitFailure } + defer configMgr.Close() hupCh := make(chan os.Signal, 1) go func() { for range hupCh { -- GitLab