diff --git a/bitbake/lib/bb/asyncrpc/client.py b/bitbake/lib/bb/asyncrpc/client.py index 628b90ee05..0d7cd85780 100644 --- a/bitbake/lib/bb/asyncrpc/client.py +++ b/bitbake/lib/bb/asyncrpc/client.py @@ -67,11 +67,14 @@ class AsyncClient(object): self.socket = await self._connect_sock() await self.setup_connection() - async def close(self): + async def disconnect(self): if self.socket is not None: await self.socket.close() self.socket = None + async def close(self): + await self.disconnect() + async def _send_wrapper(self, proc): count = 0 while True: @@ -160,6 +163,9 @@ class Client(object): def max_chunk(self, value): self.client.max_chunk = value + def disconnect(self): + self.loop.run_until_complete(self.client.close()) + def close(self): if self.loop: self.loop.run_until_complete(self.client.close())