mirror of
https://github.com/nginx/nginx.git
synced 2025-06-08 02:02:38 +08:00
fix bogus crit log message "SSL_shutdown() failed" introduced in r1755
This commit is contained in:
parent
fa0d3e1a10
commit
efe0016a11
@ -1037,17 +1037,14 @@ ngx_ssl_shutdown(ngx_connection_t *c)
|
|||||||
|
|
||||||
/* SSL_shutdown() never returns -1, on error it returns 0 */
|
/* SSL_shutdown() never returns -1, on error it returns 0 */
|
||||||
|
|
||||||
if (n != 1) {
|
if (n != 1 && ERR_peek_error()) {
|
||||||
sslerr = SSL_get_error(c->ssl->connection, n);
|
sslerr = SSL_get_error(c->ssl->connection, n);
|
||||||
|
|
||||||
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
|
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
|
||||||
"SSL_get_error: %d", sslerr);
|
"SSL_get_error: %d", sslerr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (n == 1
|
if (n == 1 || sslerr == 0 || sslerr == SSL_ERROR_ZERO_RETURN) {
|
||||||
|| sslerr == SSL_ERROR_ZERO_RETURN
|
|
||||||
|| (sslerr == 0 && c->timedout))
|
|
||||||
{
|
|
||||||
SSL_free(c->ssl->connection);
|
SSL_free(c->ssl->connection);
|
||||||
c->ssl = NULL;
|
c->ssl = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user