From 19f7817859f376a6fe811b839c6f3368cd2888da Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Sat, 14 Nov 2020 17:01:46 +0200 Subject: [PATCH] Cleanup knownnodes only if network is enabled --- src/class_singleCleaner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/class_singleCleaner.py b/src/class_singleCleaner.py index 3f3f8ec0..0c255ecd 100644 --- a/src/class_singleCleaner.py +++ b/src/class_singleCleaner.py @@ -108,7 +108,8 @@ class singleCleaner(StoppableThread): try: # Cleanup knownnodes and handle possible severe exception # while writing it to disk - knownnodes.cleanupKnownNodes() + if state.enableNetwork: + knownnodes.cleanupKnownNodes() except Exception as err: if "Errno 28" in str(err): self.logger.fatal(