mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-01 13:58:04 +00:00
bitbake: asyncrpc: client: Prevent double closing of loop
Invalidate the loop in the client close() call so that it is not closed twice (which is an error in the asyncio code) (Bitbake rev: ef22f8ee82c242383625f078baafb629e45dad7e) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
dabed6288a
commit
66bcf57bfe
|
|
@ -161,10 +161,12 @@ class Client(object):
|
|||
self.client.max_chunk = value
|
||||
|
||||
def close(self):
|
||||
self.loop.run_until_complete(self.client.close())
|
||||
if sys.version_info >= (3, 6):
|
||||
self.loop.run_until_complete(self.loop.shutdown_asyncgens())
|
||||
self.loop.close()
|
||||
if self.loop:
|
||||
self.loop.run_until_complete(self.client.close())
|
||||
if sys.version_info >= (3, 6):
|
||||
self.loop.run_until_complete(self.loop.shutdown_asyncgens())
|
||||
self.loop.close()
|
||||
self.loop = None
|
||||
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user