BUG/MINOR: ssl: error is not reported if it occurs simultaneously with peer close detection.

This commit is contained in:
Emeric Brun 2012-12-14 12:33:41 +01:00 committed by Willy Tarreau
parent 644cde05f6
commit 1c64686788

View File

@ -1078,6 +1078,11 @@ static int ssl_sock_to_buf(struct connection *conn, struct buffer *buf, int coun
else if (ret == 0) {
ret = SSL_get_error(conn->xprt_ctx, ret);
if (ret != SSL_ERROR_ZERO_RETURN) {
/* error on protocol or underlying transport */
if ((ret != SSL_ERROR_SYSCALL)
|| (errno && (errno != EAGAIN)))
conn->flags |= CO_FL_ERROR;
/* Clear openssl global errors stack */
ERR_clear_error();
}