From 42972cae4d5e054e0a53f6087737a94b1ae7cbf4 Mon Sep 17 00:00:00 2001 From: Kyle Wuolle Date: Thu, 24 Jan 2019 15:45:13 -0800 Subject: [PATCH] Cleanup the cluster provider when the agent is closed Signed-off-by: Kyle Wuolle (cherry picked from commit c7125bd9bdcbcde60f41bde37fd8d99bc679f55d) Signed-off-by: Sebastiaan van Stijn --- agent.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/agent.go b/agent.go index c90fa81ff8..29c878e09a 100644 --- a/agent.go +++ b/agent.go @@ -378,6 +378,9 @@ func (c *controller) agentClose() { c.agent = nil c.Unlock() + // when the agent is closed the cluster provider should be cleaned up + c.SetClusterProvider(nil) + if agent == nil { return }