1
0

handle network.interface being None when network is disconnected

This commit is contained in:
ThomasV
2013-10-04 19:27:50 +02:00
parent ac956a97cb
commit a38298c5ee
4 changed files with 20 additions and 11 deletions

View File

@@ -92,7 +92,11 @@ class Blockchain(threading.Thread):
print_error("error", i.server)
# todo: dismiss that server
h = self.servers_height.get(self.network.interface.server)
if self.network.is_connected():
h = self.servers_height.get(self.network.interface.server)
else:
h = None
if h is not None and h < height - 1:
print_error( "Server is lagging", height, h)
if self.config.get('auto_cycle'):