summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-25 09:22:17 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-26 09:26:11 +0000
commit770b4ea81b6126b0830e51649c40f7a46c64132a (patch)
tree61598bdd89952d1526344981d116a55a5fafc0cd
parent9ee3fb95330003878fbd64b3ce8897aad96fcd0f (diff)
downloadbitbake-770b4ea81b6126b0830e51649c40f7a46c64132a.tar.gz
siggen: Add missing reset handler to hashserv signature generator
When we have a client connection, we should close that connection when reset() is called on the siggen. Add the missing function. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/siggen.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
index ff6b24ccd..1612b4efa 100644
--- a/lib/bb/siggen.py
+++ b/lib/bb/siggen.py
@@ -492,6 +492,12 @@ class SignatureGeneratorUniHashMixIn(object):
self._client = hashserv.create_client(self.server)
return self._client
+ def reset(self, data):
+ if getattr(self, '_client', None) is not None:
+ self._client.close()
+ self._client = None
+ return super().reset(data)
+
def exit(self):
if getattr(self, '_client', None) is not None:
self._client.close()