Cleanup knownnodes only if network is enabled

This commit is contained in:
Dmitri Bogomolov 2020-11-14 17:01:46 +02:00
parent 339a63af58
commit 664abe9c9b
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -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(