mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-01 09:01:03 +01:00
While we get reports of connection setup errors in fc_err/bc_err, we don't have the equivalent for the recv/send/splice syscalls. Let's add provisions for new codes that cover the common errno values that recv/send/splice can return, i.e. ECONNREFUSED, ENOMEM, EBADF, EFAULT, EINVAL, ENOTCONN, ENOTSOCK, ENOBUFS, EPIPE. We also add a special case for when the poller reported the error itself. It's worth noting that EBADF/EFAULT/EINVAL will generally indicate serious bugs in the code and should not be reported. The only thing is that it's quite hard to forcefully (and reliably) trigger these errors in automated tests as the timing is critical. Using iptables to manually reset established connections in the middle of large transfers at least permits to see some ECONNRESET and/or EPIPE, but the other ones are harder to trigger.