Agent: Fix crash when connecting to IPv4Address

socket.connect() needs a string, not IPv4Address, otherwise the thread
will crash.
This commit is contained in:
Mike Salvatore 2022-09-19 14:01:51 -04:00
parent 51ecf52d4b
commit 9ea291a7fa
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ def notify_disconnect(server_ip: IPv4Address, server_port: int):
d_socket.settimeout(LONG_REQUEST_TIMEOUT)
try:
d_socket.connect((server_ip, server_port))
d_socket.connect((str(server_ip), server_port))
d_socket.sendall(RELAY_CONTROL_MESSAGE_REMOVE_FROM_WAITLIST)
logger.info(f"Control message was sent to the server/relay {server_ip}:{server_port}")
except OSError as err: