mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-25 15:51:24 +02:00
BUG/MINOR: ssl: report the L4 connection as established when possible
If we get an SSL error during the handshake, we at least try to see if a syscall reported an error or not. In case of an error, it generally means that the connection failed. If there is no error, then the connection established successfully. The difference is important for health checks which report the precise cause to the logs and to the stats.
This commit is contained in:
parent
051cdab68b
commit
8923019a1d
@ -720,6 +720,12 @@ int ssl_sock_handshake(struct connection *conn, unsigned int flag)
|
||||
__conn_sock_poll_recv(conn);
|
||||
return 0;
|
||||
}
|
||||
else if (ret == SSL_ERROR_SYSCALL) {
|
||||
/* if errno is null, then connection was successfully established */
|
||||
if (!errno && conn->flags & CO_FL_WAIT_L4_CONN)
|
||||
conn->flags &= ~CO_FL_WAIT_L4_CONN;
|
||||
goto out_error;
|
||||
}
|
||||
else {
|
||||
/* Fail on all other handshake errors */
|
||||
goto out_error;
|
||||
|
Loading…
x
Reference in New Issue
Block a user