diff options
| -rw-r--r-- | bitbake/lib/bb/asyncrpc/client.py | 8 |
1 files changed, 7 insertions, 1 deletions
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): | |||
| 67 | self.socket = await self._connect_sock() | 67 | self.socket = await self._connect_sock() |
| 68 | await self.setup_connection() | 68 | await self.setup_connection() |
| 69 | 69 | ||
| 70 | async def close(self): | 70 | async def disconnect(self): |
| 71 | if self.socket is not None: | 71 | if self.socket is not None: |
| 72 | await self.socket.close() | 72 | await self.socket.close() |
| 73 | self.socket = None | 73 | self.socket = None |
| 74 | 74 | ||
| 75 | async def close(self): | ||
| 76 | await self.disconnect() | ||
| 77 | |||
| 75 | async def _send_wrapper(self, proc): | 78 | async def _send_wrapper(self, proc): |
| 76 | count = 0 | 79 | count = 0 |
| 77 | while True: | 80 | while True: |
| @@ -160,6 +163,9 @@ class Client(object): | |||
| 160 | def max_chunk(self, value): | 163 | def max_chunk(self, value): |
| 161 | self.client.max_chunk = value | 164 | self.client.max_chunk = value |
| 162 | 165 | ||
| 166 | def disconnect(self): | ||
| 167 | self.loop.run_until_complete(self.client.close()) | ||
| 168 | |||
| 163 | def close(self): | 169 | def close(self): |
| 164 | if self.loop: | 170 | if self.loop: |
| 165 | self.loop.run_until_complete(self.client.close()) | 171 | self.loop.run_until_complete(self.client.close()) |
