]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl: error is not reported if it occurs simultaneously with peer close...
authorEmeric Brun <ebrun@exceliance.fr>
Fri, 14 Dec 2012 11:33:41 +0000 (12:33 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 14 Dec 2012 14:16:44 +0000 (15:16 +0100)
src/ssl_sock.c

index 7415b754a5131cab1e01e3e3bf6f6ed23b000c04..99f22f6839d8ef5ba608d47802842cb955c23e8e 100644 (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();
                        }