aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader
diff options
context:
space:
mode:
Diffstat (limited to 'eth/downloader')
-rw-r--r--eth/downloader/queue.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go
index c6b635aff..863cc8de1 100644
--- a/eth/downloader/queue.go
+++ b/eth/downloader/queue.go
@@ -664,12 +664,11 @@ func (q *queue) expire(timeout time.Duration, pendPool map[string]*fetchRequest,
}
// Add the peer to the expiry report along the number of failed requests
expiries[id] = len(request.Headers)
+
+ // Remove the expired requests from the pending pool directly
+ delete(pendPool, id)
}
}
- // Remove the expired requests from the pending pool
- for id := range expiries {
- delete(pendPool, id)
- }
return expiries
}