fix potential cleanup issue
This commit is contained in:
parent
83eb7a0a9d
commit
e14c9e2090
@ -26,11 +26,11 @@ class RPCManager(object):
|
|||||||
def cleanup(self) -> None:
|
def cleanup(self) -> None:
|
||||||
""" Stops all enabled rpc modules """
|
""" Stops all enabled rpc modules """
|
||||||
logger.info('Cleaning up 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)
|
logger.debug('Cleaning up rpc.%s ...', mod.name)
|
||||||
mod.cleanup()
|
mod.cleanup()
|
||||||
|
del mod
|
||||||
self.registered_modules = []
|
|
||||||
|
|
||||||
def send_msg(self, msg: str) -> None:
|
def send_msg(self, msg: str) -> None:
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user