From 1e1183a8bf0e8faf10229bfef7eef98500c6989f Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sat, 7 Dec 2013 08:49:30 -0800 Subject: [PATCH] search: add a forgotten Cancel. Funny, because this one line is why I finally went and added the Context type and started plumbing it through lots of stuff. Change-Id: Ie419362048a485629e79725de9297fe485430d4a --- pkg/search/query.go | 1 + 1 file changed, 1 insertion(+) 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 } }