Cleanup knownnodes only if network is enabled

This commit is contained in:
Dmitri Bogomolov 2020-11-14 17:01:46 +02:00
parent 92647f06c0
commit 19f7817859
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(