main: don't touch freqbot state in cleanup()

cleanup() should be only called after the main loop has been exited.
At that point the state shouldn't be modified.
This commit is contained in:
gcarq
2018-06-09 01:19:42 +02:00
parent 66f6e71e7e
commit 74db82d759
4 changed files with 12 additions and 17 deletions

View File

@@ -55,7 +55,8 @@ def main(sysargv: List[str]) -> None:
logger.exception('Fatal exception!')
finally:
if freqtrade:
freqtrade.clean()
freqtrade.rpc.send_msg('*Status:* `Stopping trader...`')
freqtrade.cleanup()
sys.exit(return_code)