Prechádzať zdrojové kódy

Cleanup the cluster provider when the agent is closed

Signed-off-by: Kyle Wuolle <kyle.wuolle@gmail.com>
Kyle Wuolle 6 rokov pred
rodič
commit
7ca0bc66d3
1 zmenil súbory, kde vykonal 3 pridanie a 0 odobranie
  1. 3 0
      libnetwork/agent.go

+ 3 - 0
libnetwork/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
 	}