From f55b8d429d535cc87a1ed0069fc78b22c04536e4 Mon Sep 17 00:00:00 2001 From: itsikkes Date: Mon, 1 Aug 2016 14:46:21 +0300 Subject: [PATCH] moved connectivity checking outside of loop --- chaos_monkey/control.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chaos_monkey/control.py b/chaos_monkey/control.py index d262a78ee..d23164239 100644 --- a/chaos_monkey/control.py +++ b/chaos_monkey/control.py @@ -30,6 +30,8 @@ class ControlClient(object): if not parent: parent = GUID + internet_access = check_internet_access(WormConfiguration.internet_services) + for server in WormConfiguration.command_servers: try: WormConfiguration.current_server = server @@ -38,7 +40,7 @@ class ControlClient(object): 'hostname': hostname, 'ip_addresses': local_ips(), 'description': " ".join(platform.uname()), - 'internet_access': check_internet_access(WormConfiguration.internet_services), + 'internet_access': internet_access, 'config': WormConfiguration.as_dict(), 'parent': parent}