]> granicus.if.org Git - libevent/commitdiff
Don't loose top error in SSL
authorYury Korzhetsky <Korzhetsky.Yury@acronis.com>
Tue, 26 Feb 2019 09:33:49 +0000 (12:33 +0300)
committerAzat Khuzhin <azat@libevent.org>
Tue, 26 Feb 2019 19:30:26 +0000 (22:30 +0300)
Closes: #775 (cherry-picked)
bufferevent_openssl.c

index beebe071107280da48f90757ff0307a42c7f77a8..b51b834bca7f815993ce4e5ba1c7596b67ce9f44 100644 (file)
@@ -511,12 +511,15 @@ conn_closed(struct bufferevent_openssl *bev_ssl, int when, int errcode, int ret)
                /* IO error; possibly a dirty shutdown. */
                if ((ret == 0 || ret == -1) && ERR_peek_error() == 0)
                        dirty_shutdown = 1;
+               put_error(bev_ssl, errcode);
                break;
        case SSL_ERROR_SSL:
                /* Protocol error. */
+               put_error(bev_ssl, errcode);
                break;
        case SSL_ERROR_WANT_X509_LOOKUP:
                /* XXXX handle this. */
+               put_error(bev_ssl, errcode);
                break;
        case SSL_ERROR_NONE:
        case SSL_ERROR_WANT_READ: