File tree Expand file tree Collapse file tree 1 file changed +0
-3
lines changed
Expand file tree Collapse file tree 1 file changed +0
-3
lines changed Original file line number Diff line number Diff line change @@ -333,13 +333,11 @@ func (c *Controller[request]) startEventSourcesAndQueueLocked(ctx context.Contex
333333 defer cancel ()
334334
335335 sourceStartErrChan := make (chan error , 1 ) // Buffer chan to not leak goroutine if we time out
336- hasAccessedQueueChan := make (chan struct {}) //
337336 go func () {
338337 defer close (sourceStartErrChan )
339338 log .Info ("Starting EventSource" )
340339
341340 q := c .Queue
342- close (hasAccessedQueueChan )
343341 if err := watch .Start (ctx , q ); err != nil {
344342 sourceStartErrChan <- err
345343 return
@@ -360,7 +358,6 @@ func (c *Controller[request]) startEventSourcesAndQueueLocked(ctx context.Contex
360358 case err := <- sourceStartErrChan :
361359 return err
362360 case <- sourceStartCtx .Done ():
363- defer func () { <- hasAccessedQueueChan }() // Ensure that watch.Start has been called to avoid prematurely releasing lock before accessing c.Queue
364361 if didStartSyncingSource .Load () { // We are racing with WaitForSync, wait for it to let it tell us what happened
365362 return <- sourceStartErrChan
366363 }
You can’t perform that action at this time.
0 commit comments