mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-07 03:59:36 +00:00
Call non-blocking informerFactory.Start synchronously to avoid races
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com> Kubernetes-commit: c7a1fa432a87579895eac4b3873162d5f1dba7f5
This commit is contained in:
parent
4536e5a391
commit
f71a5cc5d3
@ -120,7 +120,7 @@ func NewCandidate(clientset kubernetes.Interface,
|
||||
func (c *LeaseCandidate) Run(ctx context.Context) {
|
||||
defer c.queue.ShutDown()
|
||||
|
||||
go c.informerFactory.Start(ctx.Done())
|
||||
c.informerFactory.Start(ctx.Done())
|
||||
if !cache.WaitForNamedCacheSync("leasecandidateclient", ctx.Done(), c.hasSynced) {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user