satellite/metainfo: Fixed bug that discarded context cancellation errors

When the context was being cancelled the error was being discarded within the rate limiting error handling which caused tests to fail.
Change-Id: I5c6458c16da09a11531233ea0ee80d914969cb3f
This commit is contained in:
Simon Guindon 2020-01-03 22:48:12 -05:00
parent fc4ea28695
commit 80b41af8f1

View File

@ -242,7 +242,8 @@ func iterateDatabase(ctx context.Context, db PointerDB, observers []*observerCon
if err := rateLimiter.Wait(ctx); err != nil {
// We don't really execute concurrent batches so we should never
// exceed the burst size of 1 and this should never happen.
return LoopError.New("unexpected error rate limiting metainfo loop %s", err)
// We can also enter here if the context is cancelled.
return LoopError.Wrap(err)
}
rawPath := item.Key.String()