diff --git a/monkey/infection_monkey/monkey.py b/monkey/infection_monkey/monkey.py index 797abb3cb..e336e6db9 100644 --- a/monkey/infection_monkey/monkey.py +++ b/monkey/infection_monkey/monkey.py @@ -127,7 +127,7 @@ class InfectionMonkey: self._control_client = ControlClient( server_address=str(server), island_api_client=self._island_api_client ) - self._control_channel = ControlChannel(server, get_agent_id(), self._island_api_client) + self._control_channel = ControlChannel(str(server), get_agent_id(), self._island_api_client) self._register_agent(self._island_address) # TODO Refactor the telemetry messengers to accept control client diff --git a/monkey/infection_monkey/network/relay/utils.py b/monkey/infection_monkey/network/relay/utils.py index fa732f7ff..ca617306e 100644 --- a/monkey/infection_monkey/network/relay/utils.py +++ b/monkey/infection_monkey/network/relay/utils.py @@ -80,11 +80,10 @@ def _check_if_island_server( def send_remove_from_waitlist_control_message_to_relays(servers: Iterable[SocketAddress]): for i, server in enumerate(servers, start=1): - server_address = SocketAddress.from_string(server) t = create_daemon_thread( target=notify_disconnect, name=f"SendRemoveFromWaitlistControlMessageToRelaysThread-{i:02d}", - args=(server_address,), + args=(server,), ) t.start()