ngx_quic_send_ctx_t *ctx;
ngx_quic_connection_t *qc;
- ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic ngx_quic_close_connection rc:%i", rc);
-
qc = ngx_quic_get_connection(c);
if (qc == NULL) {
- if (rc == NGX_ERROR) {
- ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic close connection early error");
- }
-
+ ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
+ "quic packet rejected rc:%i, cleanup connection", rc);
goto quic_done;
}
+ ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
+ "quic close %s rc:%i",
+ qc->closing ? "resumed": "initiated", rc);
+
if (!qc->closing) {
/* drop packets from retransmit queues, no ack is expected */
* closed and its state is discarded when it remains idle
*/
- ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic closing %s connection",
- qc->draining ? "drained" : "idle");
+ /* this case also handles some errors from ngx_quic_run() */
+ ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
+ "quic close silent drain:%d timedout:%d",
+ qc->draining, c->read->timedout);
} else {
/*
if (rc == NGX_OK) {
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic immediate close drain:%d",
+ "quic close immediate drain:%d",
qc->draining);
qc->close.log = c->log;
}
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic immediate close due to %s error: %ui %s",
+ "quic close immediate due to %serror: %ui %s",
qc->error_app ? "app " : "", qc->error,
qc->error_reason ? qc->error_reason : "");
}
ngx_quic_close_sockets(c);
- ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic part of connection is terminated");
+ ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, "quic close completed");
/* may be tested from SSL callback during SSL shutdown */
c->udp = NULL;
#if (NGX_DEBUG)
if (pkt.parsed) {
ngx_log_debug5(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic packet %s done decr:%d pn:%L perr:%ui rc:%i",
- ngx_quic_level_name(pkt.level), pkt.decrypted,
- pkt.pn, pkt.error, rc);
+ "quic packet done rc:%i level:%s"
+ " decr:%d pn:%L perr:%ui",
+ rc, ngx_quic_level_name(pkt.level),
+ pkt.decrypted, pkt.pn, pkt.error);
} else {
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic packet done parse failed rc:%i", rc);
+ "quic packet done rc:%i parse failed", rc);
}
#endif
pkt->parsed = 1;
- c->log->action = "processing quic packet";
+ c->log->action = "handling quic packet";
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
"quic packet rx dcid len:%uz %xV",
}
if (pkt->level != ssl_encryption_initial) {
+ ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0,
+ "quic expected initial, got handshake");
return NGX_ERROR;
}
- c->log->action = "processing initial packet";
+ c->log->action = "handling initial packet";
if (pkt->dcid.len < NGX_QUIC_CID_LEN_MIN) {
/* RFC 9000, 7.2. Negotiating Connection IDs */