Agent: Use default str representation of SocketAddress in log message in notify_disconnect()

This commit is contained in:
Shreya Malviya 2022-09-26 16:49:42 +05:30
parent 4c76543a28
commit a093a3e527
1 changed files with 2 additions and 7 deletions

View File

@ -107,11 +107,6 @@ def notify_disconnect(server_address: SocketAddress):
try:
d_socket.connect((str(server_address.ip), server_address.port))
d_socket.sendall(RELAY_CONTROL_MESSAGE_REMOVE_FROM_WAITLIST)
logger.info(
"Control message was sent to the server/relay "
f"{server_address.ip}:{server_address.port}"
)
logger.info(f"Control message was sent to the server/relay {server_address}")
except OSError as err:
logger.error(
f"Error connecting to socket {server_address.ip}:{server_address.port}: {err}"
)
logger.error(f"Error connecting to socket {server_address}: {err}")