Merge pull request #3079 from filecoin-project/fix/chainwatch-slow-read

fix a small issue in chain watch
This commit is contained in:
Łukasz Magiera 2020-08-17 08:23:38 +02:00 committed by GitHub
commit 548e94d3fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,11 +30,10 @@ func (p *Processor) subMpool(ctx context.Context) {
loop:
for {
time.Sleep(10 * time.Millisecond)
select {
case update := <-sub:
updates = append(updates, update)
default:
case <-time.After(10 * time.Millisecond):
break loop
}
}