From 105a2b39cff81683767c7a0415f25923af428a4f Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Mon, 26 Sep 2022 13:38:13 +0530 Subject: [PATCH] Agent: Add SocketAddress type variable in _send_remove_from_waitlist_control_message_to_relay() --- monkey/infection_monkey/network/relay/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monkey/infection_monkey/network/relay/utils.py b/monkey/infection_monkey/network/relay/utils.py index 4ef61269d..3f7cc4629 100644 --- a/monkey/infection_monkey/network/relay/utils.py +++ b/monkey/infection_monkey/network/relay/utils.py @@ -6,6 +6,7 @@ from typing import Dict, Iterable, Iterator, Optional from common.common_consts.timeouts import LONG_REQUEST_TIMEOUT from common.network.network_utils import address_to_ip_port +from common.types import SocketAddress from infection_monkey.island_api_client import ( AbstractIslandAPIClientFactory, IIslandAPIClient, @@ -90,6 +91,7 @@ def send_remove_from_waitlist_control_message_to_relays(servers: Iterable[str]): def _send_remove_from_waitlist_control_message_to_relay(server: str): ip, port = address_to_ip_port(server) + server_address = SocketAddress(IPv4Address(ip), int(port)) notify_disconnect(IPv4Address(ip), int(port))