Merge pull request #1233 from mavenugo/ag
Handle the case of reseting the Cluster Provider for leave caes
This commit is contained in:
commit
5ad7c23e92
1 changed files with 4 additions and 1 deletions
|
@ -218,7 +218,9 @@ func New(cfgOptions ...config.Option) (NetworkController, error) {
|
|||
|
||||
func (c *controller) SetClusterProvider(provider cluster.Provider) {
|
||||
c.cfg.Daemon.ClusterProvider = provider
|
||||
go c.clusterAgentInit()
|
||||
if provider != nil {
|
||||
go c.clusterAgentInit()
|
||||
}
|
||||
}
|
||||
|
||||
func isValidClusteringIP(addr string) bool {
|
||||
|
@ -261,6 +263,7 @@ func (c *controller) clusterAgentInit() {
|
|||
} else {
|
||||
c.agentInitDone = make(chan struct{})
|
||||
c.agentClose()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue