fix(blooms): Fix panic in bloom gateway (#13303)

The slice of block queriers can contain `nil` values, which causes nip pointer dereference when calling `Close()` on them.

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
pull/13298/head
Christian Haudum 1 year ago committed by GitHub
parent 0cb3ff1830
commit 66f97b2aec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      pkg/bloomgateway/processor.go

@ -119,7 +119,7 @@ func (p *processor) processBlocks(ctx context.Context, bqs []*bloomshipper.Close
hasClosed := make([]bool, len(bqs))
defer func() {
for i, bq := range bqs {
if !hasClosed[i] {
if bq != nil && !hasClosed[i] {
_ = bq.Close()
}
}

Loading…
Cancel
Save