summaryrefslogtreecommitdiff
path: root/poky/bitbake/lib/bb/asyncrpc/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'poky/bitbake/lib/bb/asyncrpc/client.py')
-rw-r--r--poky/bitbake/lib/bb/asyncrpc/client.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/poky/bitbake/lib/bb/asyncrpc/client.py b/poky/bitbake/lib/bb/asyncrpc/client.py
index 3eb4fdde8..50e60d5c3 100644
--- a/poky/bitbake/lib/bb/asyncrpc/client.py
+++ b/poky/bitbake/lib/bb/asyncrpc/client.py
@@ -119,6 +119,16 @@ class Client(object):
self.client = self._get_async_client()
self.loop = asyncio.new_event_loop()
+ # Override any pre-existing loop.
+ # Without this, the PR server export selftest triggers a hang
+ # when running with Python 3.7. The drawback is that there is
+ # potential for issues if the PR and hash equiv (or some new)
+ # clients need to both be instantiated in the same process.
+ # This should be revisited if/when Python 3.9 becomes the
+ # minimum required version for BitBake, as it seems not
+ # required (but harmless) with it.
+ asyncio.set_event_loop(self.loop)
+
self._add_methods('connect_tcp', 'close', 'ping')
@abc.abstractmethod