refactor: `schedule()` doesn't have to wait for `sf.term`
This commit is contained in:
parent
86da86c4ac
commit
fde127e9b9
|
@ -290,6 +290,8 @@ func (sf *subfetcher) schedule(addrs []common.Address, slots []common.Hash, read
|
|||
select {
|
||||
case sf.tasks <- tasks:
|
||||
return nil
|
||||
case <-sf.stop:
|
||||
return errTerminated // imminently so no need to wait for sf.term
|
||||
case <-sf.term:
|
||||
return errTerminated
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue