Agent: Add SocketAddress type variable in _send_remove_from_waitlist_control_message_to_relay()

This commit is contained in:
Shreya Malviya 2022-09-26 13:38:13 +05:30
parent 0db0347008
commit 105a2b39cf
1 changed files with 2 additions and 0 deletions

View File

@ -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))