fix: further improve exchange.close fix
This commit is contained in:
@@ -314,9 +314,10 @@ class Exchange:
|
|||||||
if self._exchange_ws:
|
if self._exchange_ws:
|
||||||
self._exchange_ws.cleanup()
|
self._exchange_ws.cleanup()
|
||||||
logger.debug("Exchange object destroyed, closing async loop")
|
logger.debug("Exchange object destroyed, closing async loop")
|
||||||
loop_running = (
|
generic_loop = asyncio.get_event_loop()
|
||||||
getattr(self, "loop", None) and self.loop.is_running()
|
loop_running = (getattr(self, "loop", None) and self.loop.is_running()) or (
|
||||||
) or asyncio.get_event_loop().is_running()
|
generic_loop and generic_loop.is_running()
|
||||||
|
)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
getattr(self, "_api_async", None)
|
getattr(self, "_api_async", None)
|
||||||
|
|||||||
Reference in New Issue
Block a user