mirror of https://github.com/perkeep/perkeep.git
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
This commit is contained in:
parent
e27a1dd019
commit
1e1183a8bf
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue