diff options
author | Sergey Kandaurov <pluknet@nginx.com> | 2021-11-30 14:30:59 +0300 |
---|---|---|
committer | Sergey Kandaurov <pluknet@nginx.com> | 2021-11-30 14:30:59 +0300 |
commit | ac851d7f69362ffeff4fe1f581434ab3ac9f9c59 (patch) | |
tree | dc92df0bc073b59bda95d4a7745b6f49ba673558 /src | |
parent | 0de6a1ebb48c13e658b0e94be1a3045a725c4624 (diff) | |
download | nginx-ac851d7f69362ffeff4fe1f581434ab3ac9f9c59.tar.gz nginx-ac851d7f69362ffeff4fe1f581434ab3ac9f9c59.zip |
QUIC: simplified ngx_quic_send_alert() callback.
Removed sending CLOSE_CONNECTION directly to avoid duplicate frames,
since it is sent later again in SSL_do_handshake() error handling.
As such, removed redundant settings of error fields set elsewhere.
While here, improved debug message.
Diffstat (limited to 'src')
-rw-r--r-- | src/event/quic/ngx_event_quic_output.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/event/quic/ngx_event_quic_output.c b/src/event/quic/ngx_event_quic_output.c index f121d2327..178f0b28a 100644 --- a/src/event/quic/ngx_event_quic_output.c +++ b/src/event/quic/ngx_event_quic_output.c @@ -847,23 +847,17 @@ ngx_quic_send_alert(ngx_ssl_conn_t *ssl_conn, enum ssl_encryption_level_t level, c = ngx_ssl_get_connection((ngx_ssl_conn_t *) ssl_conn); ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0, - "quic ngx_quic_send_alert() lvl:%d alert:%d", - (int) level, (int) alert); + "quic ngx_quic_send_alert() level:%s alert:%d", + ngx_quic_level_name(level), (int) alert); + + /* already closed on regular shutdown */ qc = ngx_quic_get_connection(c); if (qc == NULL) { return 1; } - qc->error_level = level; qc->error = NGX_QUIC_ERR_CRYPTO(alert); - qc->error_reason = "TLS alert"; - qc->error_app = 0; - qc->error_ftype = 0; - - if (ngx_quic_send_cc(c) != NGX_OK) { - return 0; - } return 1; } |