Agent: Fix bugs in control.py

Bugs happened because of incorrect indentation in the recent refactoring attempting to remove worm config dependency
This commit is contained in:
vakarisz 2022-06-14 16:48:44 +03:00
parent f1bc5f4707
commit e6e6587f46
1 changed files with 17 additions and 20 deletions

View File

@ -80,13 +80,10 @@ class ControlClient:
proxies=self.proxies, proxies=self.proxies,
timeout=MEDIUM_REQUEST_TIMEOUT, timeout=MEDIUM_REQUEST_TIMEOUT,
) )
return True
except ConnectionError as exc: except ConnectionError as exc:
self.server_address = ""
logger.warning("Error connecting to control server %s: %s", self.server_address, exc) logger.warning("Error connecting to control server %s: %s", self.server_address, exc)
if self.server_address:
return True
else:
if self.proxies: if self.proxies:
return False return False
else: else: