mirror of
https://github.com/perkeep/perkeep.git
synced 2025-02-26 20:25:07 +00:00
Merge "pkg/search: RLock index around GetBlobMeta"
This commit is contained in:
commit
2ed2b175a2
@ -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()
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user