Message ID | 20220325092912.1350321-2-richard.purdie@linuxfoundation.org |
---|---|
State | Accepted, archived |
Commit | 770b4ea81b6126b0830e51649c40f7a46c64132a |
Headers | show |
Series | [1/3] cooker/siggen: Support exit calls and use for hashserv client | expand |
diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py index ff6b24ccda..39a5ebe6f5 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): + if getattr(self, '_client', None) is not None: + self._client.close() + self._client = None + return super().reset() + def exit(self): if getattr(self, '_client', None) is not None: self._client.close()
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> --- lib/bb/siggen.py | 6 ++++++ 1 file changed, 6 insertions(+)