Skip to content

Commit 93d2397

Browse files
committed
fix: improved shutdown loop fix for tests
1 parent 05e759a commit 93d2397

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

freqtrade/exchange/exchange.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def close(self):
315315
self._exchange_ws.cleanup()
316316
logger.debug("Exchange object destroyed, closing async loop")
317317
loop_running = (
318-
hasattr(self, "loop") and self.loop.is_running()
318+
getattr(self, "loop", None) and self.loop.is_running()
319319
) or asyncio.get_event_loop().is_running()
320320

321321
if (

0 commit comments

Comments
 (0)