Cleanup the cluster provider when the agent is closed

Signed-off-by: Kyle Wuolle <kyle.wuolle@gmail.com>
This commit is contained in:
Kyle Wuolle 2019-01-24 15:45:13 -08:00
parent b0bef06dca
commit 7ca0bc66d3
1 changed files with 3 additions and 0 deletions

View File

@ -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
}