mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-14 03:41:14 +00:00
fix: handle RuntimeError on trades download
asyncio raises RuntimeError if the handler is not set on the main thread. closes #12211
This commit is contained in:
@@ -3259,7 +3259,7 @@ class Exchange:
|
||||
for sig in [signal.SIGINT, signal.SIGTERM]:
|
||||
try:
|
||||
self.loop.add_signal_handler(sig, task.cancel)
|
||||
except NotImplementedError:
|
||||
except (NotImplementedError, RuntimeError):
|
||||
# Not all platforms implement signals (e.g. windows)
|
||||
pass
|
||||
return self.loop.run_until_complete(task)
|
||||
|
||||
Reference in New Issue
Block a user