Cleanup knownnodes only if network is enabled

This commit is contained in:
Dmitri Bogomolov 2020-11-14 17:01:46 +02:00 committed by Lee Miller
parent a3d0e24623
commit a902c3acf7
Signed by untrusted user: lee.miller
GPG Key ID: 4F97A5EA88F4AB63

View File

@ -108,6 +108,7 @@ class singleCleaner(StoppableThread):
try: try:
# Cleanup knownnodes and handle possible severe exception # Cleanup knownnodes and handle possible severe exception
# while writing it to disk # while writing it to disk
if state.enableNetwork:
knownnodes.cleanupKnownNodes() knownnodes.cleanupKnownNodes()
except Exception as err: except Exception as err:
if "Errno 28" in str(err): if "Errno 28" in str(err):