diff --git a/libnetwork/controller.go b/libnetwork/controller.go index 0994ec8e8e..1c5026f461 100644 --- a/libnetwork/controller.go +++ b/libnetwork/controller.go @@ -218,9 +218,7 @@ func New(cfgOptions ...config.Option) (NetworkController, error) { func (c *controller) SetClusterProvider(provider cluster.Provider) { c.cfg.Daemon.ClusterProvider = provider - if provider != nil { - go c.clusterAgentInit() - } + go c.clusterAgentInit() } func isValidClusteringIP(addr string) bool { @@ -263,7 +261,6 @@ func (c *controller) clusterAgentInit() { } else { c.agentInitDone = make(chan struct{}) c.agentClose() - return } } }