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.
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);
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;
}
qc = ngx_quic_get_connection(c);
- qc->error = 0;
+ qc->error = (ngx_uint_t) -1;
qc->error_reason = 0;
c->log->action = "decrypting packet";