From: Willy Tarreau Date: Fri, 24 Jan 2014 15:10:57 +0000 (+0100) Subject: MEDIUM: checks: make use of chk_report_conn_err() for connection errors X-Git-Tag: v1.5-dev22~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bd07de0870d07e5aa202841bd2e73418167a6c0;p=thirdparty%2Fhaproxy.git 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 b990d614f2..ac1bbed856 100644 --- a/src/checks.c +++ b/src/checks.c @@ -1606,12 +1606,14 @@ static struct task *process_chk(struct task *t) 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; }