diff --git a/pkg/block/fetcher.go b/pkg/block/fetcher.go index 883b8e0608..772d37a48b 100644 --- a/pkg/block/fetcher.go +++ b/pkg/block/fetcher.go @@ -257,7 +257,11 @@ func (f *ConcurrentLister) GetActiveAndPartialBlockIDs(ctx context.Context, ch c mu.Unlock() continue } - ch <- uid + select { + case <-ctx.Done(): + return ctx.Err() + case ch <- uid: + } } return nil })