Merge "pkg/search: RLock index around GetBlobMeta"

This commit is contained in:
Mathieu Lonjaret 2016-05-03 15:08:13 +00:00 committed by Gerrit Code Review
commit 2ed2b175a2

View File

@ -95,10 +95,12 @@ func (sh *Handler) subscribeToNewBlobs() {
go func() {
ctx := context.Background()
for br := range ch {
sh.index.RLock()
bm, err := sh.index.GetBlobMeta(ctx, br)
if err == nil {
sh.wsHub.newBlobRecv <- bm.CamliType
}
sh.index.RUnlock()
}
}()
}