mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Properly remove rpc handler
This commit is contained in:
parent
2ec22f1d97
commit
e5b1657ab3
|
@ -76,7 +76,6 @@ class ApiServer(RPCHandler):
|
||||||
Attach rpc handler
|
Attach rpc handler
|
||||||
"""
|
"""
|
||||||
if not self._has_rpc:
|
if not self._has_rpc:
|
||||||
self._rpc = rpc
|
|
||||||
ApiServer._rpc = rpc
|
ApiServer._rpc = rpc
|
||||||
ApiServer._has_rpc = True
|
ApiServer._has_rpc = True
|
||||||
else:
|
else:
|
||||||
|
@ -85,7 +84,9 @@ class ApiServer(RPCHandler):
|
||||||
|
|
||||||
def cleanup(self) -> None:
|
def cleanup(self) -> None:
|
||||||
""" Cleanup pending module resources """
|
""" Cleanup pending module resources """
|
||||||
if self._server:
|
ApiServer._has_rpc = False
|
||||||
|
del ApiServer._rpc
|
||||||
|
if self._server and not self._standalone:
|
||||||
logger.info("Stopping API Server")
|
logger.info("Stopping API Server")
|
||||||
self._server.cleanup()
|
self._server.cleanup()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user