mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
core/filtermaps: use buffered channel to avoid blocking
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
116c916753
commit
95b33bd937
1 changed files with 1 additions and 1 deletions
|
|
@ -143,7 +143,7 @@ func (f *FilterMaps) SetBlockProcessing(blockProcessing bool) {
|
||||||
// latest targetView.
|
// latest targetView.
|
||||||
func (f *FilterMaps) WaitIdle() {
|
func (f *FilterMaps) WaitIdle() {
|
||||||
for {
|
for {
|
||||||
ch := make(chan bool)
|
ch := make(chan bool, 1) // buffered so the indexer response can't block
|
||||||
select {
|
select {
|
||||||
case f.waitIdleCh <- ch:
|
case f.waitIdleCh <- ch:
|
||||||
if <-ch {
|
if <-ch {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue