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
333
333
defer cancel ()
334
334
335
335
sourceStartErrChan := make (chan error , 1 ) // Buffer chan to not leak goroutine if we time out
336
- hasAccessedQueueChan := make (chan struct {}) //
337
336
go func () {
338
337
defer close (sourceStartErrChan )
339
338
log .Info ("Starting EventSource" )
340
339
341
340
q := c .Queue
342
- close (hasAccessedQueueChan )
343
341
if err := watch .Start (ctx , q ); err != nil {
344
342
sourceStartErrChan <- err
345
343
return
@@ -360,7 +358,6 @@ func (c *Controller[request]) startEventSourcesAndQueueLocked(ctx context.Contex
360
358
case err := <- sourceStartErrChan :
361
359
return err
362
360
case <- sourceStartCtx .Done ():
363
- defer func () { <- hasAccessedQueueChan }() // Ensure that watch.Start has been called to avoid prematurely releasing lock before accessing c.Queue
364
361
if didStartSyncingSource .Load () { // We are racing with WaitForSync, wait for it to let it tell us what happened
365
362
return <- sourceStartErrChan
366
363
}
You can’t perform that action at this time.
0 commit comments