From e14c9e2090c9175c93ca8eecfa8c216b8bebcb7e Mon Sep 17 00:00:00 2001 From: gcarq Date: Sat, 9 Jun 2018 13:30:48 +0200 Subject: [PATCH] fix potential cleanup issue --- freqtrade/rpc/rpc_manager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/rpc/rpc_manager.py b/freqtrade/rpc/rpc_manager.py index 370d18176..252bbcdd8 100644 --- a/freqtrade/rpc/rpc_manager.py +++ b/freqtrade/rpc/rpc_manager.py @@ -26,11 +26,11 @@ class RPCManager(object): def cleanup(self) -> None: """ Stops all enabled rpc modules """ logger.info('Cleaning up rpc modules ...') - for mod in self.registered_modules: + while self.registered_modules: + mod = self.registered_modules.pop() logger.debug('Cleaning up rpc.%s ...', mod.name) mod.cleanup() - - self.registered_modules = [] + del mod def send_msg(self, msg: str) -> None: """