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:
# Cleanup knownnodes and handle possible severe exception
# while writing it to disk
if state.enableNetwork:
knownnodes.cleanupKnownNodes()
except Exception as err:
if "Errno 28" in str(err):