Explicitly close loop in async tests

This commit is contained in:
Matthias
2023-03-26 15:46:20 +02:00
parent 444d18aa39
commit fb1541bdf6
2 changed files with 15 additions and 8 deletions

View File

@@ -205,6 +205,8 @@ class Exchange:
and self._api_async.session):
logger.debug("Closing async ccxt session.")
self.loop.run_until_complete(self._api_async.close())
if self.loop and not self.loop.is_closed():
self.loop.close()
def validate_config(self, config):
# Check if timeframe is available