Merge pull request #3079 from filecoin-project/fix/chainwatch-slow-read
fix a small issue in chain watch
This commit is contained in:
commit
548e94d3fc
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user