MEDIUM: checks: make use of chk_report_conn_err() for connection errors
Checks used not to precisely report the errors that were detected at the
connection layer (eg: too many SSL connections). Using chk_report_conn_err()
makes this possible.
diff --git a/src/checks.c b/src/checks.c
index b990d61..ac1bbed 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -1606,12 +1606,14 @@
case SN_ERR_SRVTO: /* ETIMEDOUT */
case SN_ERR_SRVCL: /* ECONNREFUSED, ENETUNREACH, ... */
- set_server_check_status(check, HCHK_STATUS_L4CON, strerror(errno));
+ conn->flags |= CO_FL_ERROR;
+ chk_report_conn_err(conn, errno, 0);
break;
case SN_ERR_PRXCOND:
case SN_ERR_RESOURCE:
case SN_ERR_INTERNAL:
- set_server_check_status(check, HCHK_STATUS_SOCKERR, NULL);
+ conn->flags |= CO_FL_ERROR;
+ chk_report_conn_err(conn, 0, 0);
break;
}