# HG changeset patch # User Roman Arutyunyan # Date 1662539835 -14400 # Node ID 9c427e98d8c1f1b101d85b461bea00a5704d1443 # Parent 70ce1e92771539d9426ff13a177a7b8668335fde QUIC: treat qc->error == -1 as a missing error. Previously, zero was used for this purpose. However, NGX_QUIC_ERR_NO_ERROR is zero too. As a result, NGX_QUIC_ERR_NO_ERROR was changed to NGX_QUIC_ERR_INTERNAL_ERROR when closing a QUIC connection. diff -r 70ce1e927715 -r 9c427e98d8c1 src/event/quic/ngx_event_quic.c --- a/src/event/quic/ngx_event_quic.c Fri Nov 25 15:56:33 2022 +0400 +++ b/src/event/quic/ngx_event_quic.c Wed Sep 07 12:37:15 2022 +0400 @@ -73,7 +73,7 @@ if (qc) { - if (qc->error) { + if (qc->error != (ngx_uint_t) -1) { p = ngx_slprintf(p, last, "%s", qc->error_app ? " app" : ""); p = ngx_slprintf(p, last, " error:%ui", qc->error); @@ -523,7 +523,7 @@ qc->error = NGX_QUIC_ERR_NO_ERROR; } else { - if (qc->error == 0 && !qc->error_app) { + if (qc->error == (ngx_uint_t) -1 && !qc->error_app) { qc->error = NGX_QUIC_ERR_INTERNAL_ERROR; } @@ -939,7 +939,7 @@ qc = ngx_quic_get_connection(c); - qc->error = 0; + qc->error = (ngx_uint_t) -1; qc->error_reason = 0; c->log->action = "decrypting packet";