mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
refactor: schedule() doesn't have to wait for sf.term
This commit is contained in:
parent
86da86c4ac
commit
fde127e9b9
1 changed files with 2 additions and 0 deletions
|
|
@ -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 a new issue