resolve-hostnames: handle socket.error in get_socket_info() as well