comparison src/event/ngx_event_openssl.c @ 5747:57c05ff57980

SSL: logging level of "peer closed connection in SSL handshake". Previously, the NGX_LOG_INFO level was used unconditionally. This is correct for client SSL connections, but too low for connections to upstream servers. To resolve this, ngx_connection_error() now used to log this error, it will select logging level appropriately. With this change, if an upstream connection is closed during SSL handshake, it is now properly logged at "error" level.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 04 Jul 2014 22:14:36 +0400
parents 42114bf12da0
children c7ecd097b883
comparison
equal deleted inserted replaced
5746:35990c69b3ac 5747:57c05ff57980
1110 c->ssl->no_wait_shutdown = 1; 1110 c->ssl->no_wait_shutdown = 1;
1111 c->ssl->no_send_shutdown = 1; 1111 c->ssl->no_send_shutdown = 1;
1112 c->read->eof = 1; 1112 c->read->eof = 1;
1113 1113
1114 if (sslerr == SSL_ERROR_ZERO_RETURN || ERR_peek_error() == 0) { 1114 if (sslerr == SSL_ERROR_ZERO_RETURN || ERR_peek_error() == 0) {
1115 ngx_log_error(NGX_LOG_INFO, c->log, err, 1115 ngx_connection_error(c, err,
1116 "peer closed connection in SSL handshake"); 1116 "peer closed connection in SSL handshake");
1117 1117
1118 return NGX_ERROR; 1118 return NGX_ERROR;
1119 } 1119 }
1120 1120
1121 c->read->error = 1; 1121 c->read->error = 1;