static void _conn_error(UNUSED fr_event_list_t *el, UNUSED int fd, UNUSED int flags, int fd_errno, void *uctx) \
{ \
trunk_connection_t *tconn = talloc_get_type_abort(uctx, trunk_connection_t); \
- ERROR("%s - Connection failed: %s", tconn->conn->name, fr_syserror(fd_errno)); \
+ if (fd_errno) ERROR("%s - Connection failed: %s", tconn->conn->name, fr_syserror(fd_errno)); \
connection_signal_reconnect(tconn->conn, CONNECTION_FAILED); \
} \
CC_NO_UBSAN(function) /* UBSAN: false positive - public vs private connection_t trips --fsanitize=function*/ \
{
rlm_logtee_thread_t *t = talloc_get_type_abort(uctx, rlm_logtee_thread_t);
- ERROR("Connection failed (%i): %s", sock, fr_syserror(fd_errno));
+ if (fd_errno) ERROR("Connection failed (%i): %s", sock, fr_syserror(fd_errno));
/*
* Something bad happened... Fix it...
connection_t *conn = tconn->conn;
bio_handle_t *h = talloc_get_type_abort(conn->h, bio_handle_t);
- ERROR("%s - Connection %s failed: %s", h->ctx.module_name, h->ctx.fd_info->name, fr_syserror(fd_errno));
+ if (fd_errno) ERROR("%s - Connection %s failed: %s", h->ctx.module_name, h->ctx.fd_info->name, fr_syserror(fd_errno));
connection_signal_reconnect(conn, CONNECTION_FAILED);
}
connection_t *conn = tconn->conn;
tcp_handle_t *h = talloc_get_type_abort(conn->h, tcp_handle_t);
- ERROR("%s - Connection %s failed: %s", h->module_name, h->name, fr_syserror(fd_errno));
+ if (fd_errno) ERROR("%s - Connection %s failed: %s", h->module_name, h->name, fr_syserror(fd_errno));
connection_signal_reconnect(conn, CONNECTION_FAILED);
}