From f6abecabf56805c25edf9a316427f861d6d2d73a Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Fri, 29 Jul 2016 18:05:36 -0700 Subject: [PATCH] agent: shutdown connection on node stop Signed-off-by: Stephen J Day --- agent/node.go | 1 + 1 file changed, 1 insertion(+) diff --git a/agent/node.go b/agent/node.go index 6de6e57d26..82b23763d6 100644 --- a/agent/node.go +++ b/agent/node.go @@ -377,6 +377,7 @@ func (n *Node) runAgent(ctx context.Context, db *bolt.DB, creds credentials.Tran if err != nil { return err } + defer conn.Close() agent, err := New(&Config{ Hostname: n.config.Hostname,