Skip to content

Commit

Permalink
daemon/worker: decrease log level of uv_udp_connect() failure
Browse files Browse the repository at this point in the history
In particular, ENETUNREACH happens on systems without IPv6,
and it doesn't make much sense to log about that by default:
  [io    ] Failed to establish udp connection: address not available

Introduced in 82e1d59.

Also log the IP address.
  • Loading branch information
vcunat committed Nov 19, 2024
1 parent 26606f9 commit 83d400f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions daemon/worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,10 @@ static int transmit(struct qr_task *task)
do {
ret = uv_udp_connect(udp, out_comm.comm_addr);
} while (ret == UV_EADDRINUSE && --connect_tries > 0);
if (ret < 0)
kr_log_error(IO, "Failed to establish udp connection: %s\n", uv_strerror(ret));
if (ret < 0) {
kr_log_info(IO, "Failed to establish udp connection to %s: %s\n",
kr_straddr(out_comm.comm_addr), uv_strerror(ret));
}
}
ret = qr_task_send(task, session, &out_comm, task->pktbuf);
if (ret) {
Expand Down

0 comments on commit 83d400f

Please sign in to comment.