diff --git a/pkg/search/query.go b/pkg/search/query.go index 3e16e49be..d80a6e455 100644 --- a/pkg/search/query.go +++ b/pkg/search/query.go @@ -310,6 +310,7 @@ func (h *Handler) Query(rawq *SearchQuery) (*SearchResult, error) { Blob: meta.Ref, }) if q.Limit > 0 && len(res.Blobs) == q.Limit && q.candidatesAreSorted(s) { + sendCtx.Cancel() break } }