Don't loose top error in SSL

Closes: #775 (cherry-picked)
(cherry picked from commit a30d6d85219ea80c16df6da4f6a9430254e5a0da)
This commit is contained in:
Yury Korzhetsky 2019-02-26 12:33:49 +03:00 committed by Azat Khuzhin
parent ca76ebb0d6
commit 3d1a7a1d45
No known key found for this signature in database
GPG Key ID: B86086848EF8686D

View 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: