forked from p15670423/monkey
Use SocketAddress.from_string() in network/relay/utils.py
This commit is contained in:
parent
1f80eac4b6
commit
441c14f15d
|
@ -4,7 +4,6 @@ from contextlib import suppress
|
||||||
from typing import Dict, Iterable, Iterator, Optional
|
from typing import Dict, Iterable, Iterator, Optional
|
||||||
|
|
||||||
from common.common_consts.timeouts import LONG_REQUEST_TIMEOUT
|
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 common.types import SocketAddress
|
||||||
from infection_monkey.island_api_client import (
|
from infection_monkey.island_api_client import (
|
||||||
AbstractIslandAPIClientFactory,
|
AbstractIslandAPIClientFactory,
|
||||||
|
@ -89,8 +88,7 @@ def send_remove_from_waitlist_control_message_to_relays(servers: Iterable[str]):
|
||||||
|
|
||||||
|
|
||||||
def _send_remove_from_waitlist_control_message_to_relay(server: str):
|
def _send_remove_from_waitlist_control_message_to_relay(server: str):
|
||||||
server_address = SocketAddress(*address_to_ip_port(server))
|
notify_disconnect(SocketAddress.from_string(server))
|
||||||
notify_disconnect(server_address)
|
|
||||||
|
|
||||||
|
|
||||||
def notify_disconnect(server_address: SocketAddress):
|
def notify_disconnect(server_address: SocketAddress):
|
||||||
|
|
Loading…
Reference in New Issue