summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index fafc59f94..2e63e6a9e 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -9544,6 +9544,13 @@ class Scheduler(PollScheduler):
remaining, state_change = self._schedule_tasks_imp()
self._task_queues.merge.schedule()
self._status_display.display()
+
+ # Cancel prefetchers if they're the only reason
+ # the main poll loop is still running.
+ if self._failed_pkgs and \
+ not (self._jobs or self._task_queues.merge):
+ self._task_queues.fetch.clear()
+
return remaining
def _schedule_tasks_imp(self):