Klaus Demo nginx / efe0016
fix bogus crit log message "SSL_shutdown() failed" introduced in r1755 Igor Sysoev 14 years ago
1 changed file(s) with 2 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
10361036
10371037 /* SSL_shutdown() never returns -1, on error it returns 0 */
10381038
1039 if (n != 1) {
1039 if (n != 1 && ERR_peek_error()) {
10401040 sslerr = SSL_get_error(c->ssl->connection, n);
10411041
10421042 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
10431043 "SSL_get_error: %d", sslerr);
10441044 }
10451045
1046 if (n == 1
1047 || sslerr == SSL_ERROR_ZERO_RETURN
1048 || (sslerr == 0 && c->timedout))
1049 {
1046 if (n == 1 || sslerr == 0 || sslerr == SSL_ERROR_ZERO_RETURN) {
10501047 SSL_free(c->ssl->connection);
10511048 c->ssl = NULL;
10521049