changeset 8793:80d396fd8ee8 quic

QUIC: improved errors readability.
author Vladimir Homutov <vl@nginx.com>
date Thu, 10 Jun 2021 23:17:51 +0300
parents 004172345bdc
children ba5977b38b2e
files src/event/quic/ngx_event_quic.c src/event/quic/ngx_event_quic_ssl.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic.c
+++ b/src/event/quic/ngx_event_quic.c
@@ -912,7 +912,8 @@ ngx_quic_process_payload(ngx_connection_
 
     if (!ngx_quic_keys_available(qc->keys, pkt->level)) {
         ngx_log_error(NGX_LOG_INFO, c->log, 0,
-                      "quic no level %d keys yet, ignoring packet", pkt->level);
+                      "quic no %s keys, ignoring packet",
+                      ngx_quic_level_name(pkt->level));
         return NGX_DECLINED;
     }
 
--- a/src/event/quic/ngx_event_quic_ssl.c
+++ b/src/event/quic/ngx_event_quic_ssl.c
@@ -404,6 +404,7 @@ ngx_quic_crypto_input(ngx_connection_t *
 
         if (sslerr != SSL_ERROR_WANT_READ) {
             ngx_ssl_error(NGX_LOG_ERR, c->log, 0, "SSL_do_handshake() failed");
+            qc->error_reason = "handshake failed";
             return NGX_ERROR;
         }