Skip to content

Commit

Permalink
fix err
Browse files Browse the repository at this point in the history
  • Loading branch information
cristaloleg committed Nov 21, 2024
1 parent 3d767d3 commit f27236c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions share/availability/light/availability.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (la *ShareAvailability) SharesAvailable(ctx context.Context, header *header
idxs[i] = shwap.SampleCoords{Row: s.Row, Col: s.Col}
}

smpls, err := la.getter.GetSamples(samplingCtx, header, idxs)
smpls, errGetSamples := la.getter.GetSamples(samplingCtx, header, idxs)
if len(smpls) == 0 {
return share.ErrNotAvailable
}
Expand Down Expand Up @@ -157,7 +157,7 @@ func (la *ShareAvailability) SharesAvailable(ctx context.Context, header *header
return fmt.Errorf("store sampling result: %w", err)
}

if errors.Is(err, context.Canceled) {
if errors.Is(errGetSamples, context.Canceled) {
// Availability did not complete due to context cancellation, return context error instead of
// share.ErrNotAvailable
return context.Canceled
Expand Down

0 comments on commit f27236c

Please sign in to comment.