[2/2] cooker: Ensure any existing hashserv connection is closed

Message ID 20220331200543.1583022-2-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit 42ff9de77f24e2a0bec48a14b64c4b538e00b4af
Headers show
Series [1/2,v2] cooker: Restore sys.path and sys.modules between parses | expand

Commit Message

Richard Purdie March 31, 2022, 8:05 p.m. UTC
Ensure any exiting hash server connection is terminated before we start
a new bitbake session. This avoids errors seen with memory resident bitbake
when the asyncio event loop isn't closed correctly.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bb/cooker.py | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 0d29aa03a0..d100b96f53 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1766,6 +1766,8 @@  class BBCooker:
         self.state = state.initial
 
     def reset(self):
+        if hasattr(bb.parse, "siggen"):
+            bb.parse.siggen.exit()
         self.initConfigurationData()
         self.handlePRServ()