diff --git a/client/client.go b/client/client.go index b334bae2a..61ebed24b 100644 --- a/client/client.go +++ b/client/client.go @@ -287,7 +287,7 @@ type Client struct { batchNodeUpdates *batchNodeUpdates // fpInitialized chan is closed when the first batch of fingerprints are - // applied to the node and the server is updated + // applied to the node fpInitialized chan struct{} // serversContactedCh is closed when GetClientAllocs and runAllocs have @@ -524,7 +524,7 @@ func NewClient(cfg *config.Config, consulCatalog consul.CatalogAPI, consulProxie // wait until drivers are healthy before restoring or registering with servers select { - case <-c.Ready(): + case <-c.fpInitialized: case <-time.After(batchFirstFingerprintsProcessingGrace): logger.Warn("batch fingerprint operation timed out; proceeding to register with fingerprinted plugins so far") } @@ -566,7 +566,7 @@ func NewClient(cfg *config.Config, consulCatalog consul.CatalogAPI, consulProxie // Ready returns a chan that is closed when the client is fully initialized func (c *Client) Ready() <-chan struct{} { - return c.fpInitialized + return c.serversContactedCh } // init is used to initialize the client and perform any setup