mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-27 11:52:34 -04:00
CLEANUP: tcpcheck: mention that we're a bit far for a sync errno
The collection of errno in tcpcheck_eval_connect() and tcpcheck_main() is quite far from the production location, and the risk of having a zero errno is definitely not null. Tests show that this works, so better not try to fix something not broken, but at least place a comment there indicating that it's not necessarily super-reliable. This would need to be revisited the day we finally store errno in the connection.
This commit is contained in:
parent
3b825d2745
commit
bbc41785d9
1 changed files with 2 additions and 0 deletions
|
|
@ -1611,6 +1611,7 @@ enum tcpcheck_eval_ret tcpcheck_eval_connect(struct check *check, struct tcpchec
|
|||
case SF_ERR_RESOURCE:
|
||||
case SF_ERR_INTERNAL:
|
||||
TRACE_ERROR("report connection error", CHK_EV_TCPCHK_CONN|CHK_EV_TCPCHK_ERR, check, 0, 0, (size_t[]){status});
|
||||
/* note: errno is no longer guaranteed here */
|
||||
chk_report_conn_err(check, errno, 0);
|
||||
ret = TCPCHK_EVAL_STOP;
|
||||
goto out;
|
||||
|
|
@ -2648,6 +2649,7 @@ int tcpcheck_main(struct check *check)
|
|||
out_end_tcpcheck:
|
||||
if ((conn && conn->flags & CO_FL_ERROR) || sc_ep_test(sc, SE_FL_ERROR)) {
|
||||
TRACE_ERROR("report connection error", CHK_EV_TCPCHK_EVAL|CHK_EV_TCPCHK_ERR, check);
|
||||
/* note: errno is no longer guaranteed here */
|
||||
chk_report_conn_err(check, errno, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue