diff --git a/internal/blocksync/pool.go b/internal/blocksync/pool.go index 69bdd1a18..962e3d8a7 100644 --- a/internal/blocksync/pool.go +++ b/internal/blocksync/pool.go @@ -130,11 +130,7 @@ func (*BlockPool) OnStop() {} // spawns requesters as needed func (pool *BlockPool) makeRequestersRoutine(ctx context.Context) { - for { - if !pool.IsRunning() { - break - } - + for pool.IsRunning() { _, numPending, lenRequesters := pool.GetStatus() switch { case numPending >= maxPendingRequests: