aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/portage/util/futures/retry.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/portage/util/futures/retry.py b/lib/portage/util/futures/retry.py
index 4092f60d6..31cc161da 100644
--- a/lib/portage/util/futures/retry.py
+++ b/lib/portage/util/futures/retry.py
@@ -1,4 +1,4 @@
-# Copyright 2018 Gentoo Foundation
+# Copyright 2018-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
__all__ = (
@@ -113,7 +113,7 @@ class _Retry:
def _begin_try(self):
self._tries += 1
- self._current_task = self._func()
+ self._current_task = asyncio.ensure_future(self._func(), loop=self._loop)
self._current_task.add_done_callback(self._try_done)
if self._try_timeout is not None:
self._try_timeout_handle = self._loop.call_later(