mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-09-20 09:31:12 +00:00
Don't forget to close WS session
This commit is contained in:
parent
c18b6cdb74
commit
55bd7db022
|
@ -271,6 +271,11 @@ class Exchange:
|
||||||
):
|
):
|
||||||
logger.debug("Closing async ccxt session.")
|
logger.debug("Closing async ccxt session.")
|
||||||
self.loop.run_until_complete(self._api_async.close())
|
self.loop.run_until_complete(self._api_async.close())
|
||||||
|
if (self._ws_async and inspect.iscoroutinefunction(self._ws_async.close)
|
||||||
|
and self._ws_async.session):
|
||||||
|
logger.debug("Closing ws ccxt session.")
|
||||||
|
self.loop.run_until_complete(self._ws_async.close())
|
||||||
|
|
||||||
if self.loop and not self.loop.is_closed():
|
if self.loop and not self.loop.is_closed():
|
||||||
self.loop.close()
|
self.loop.close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user