TRACE_ENTER(QUIC_EV_CONN_INIT);
- next_actconn = increment_actconn();
- if (!next_actconn) {
- _HA_ATOMIC_INC(&maxconn_reached);
- TRACE_STATE("maxconn reached", QUIC_EV_CONN_INIT);
- goto err;
- }
-
next_sslconn = increment_sslconn();
if (!next_sslconn) {
TRACE_STATE("sslconn reached", QUIC_EV_CONN_INIT);
}
if (l) {
+ next_actconn = increment_actconn();
+ if (!next_actconn) {
+ _HA_ATOMIC_INC(&maxconn_reached);
+ TRACE_STATE("maxconn reached", QUIC_EV_CONN_INIT);
+ goto err;
+ }
+
next_handshake = quic_increment_curr_handshake(l);
if (!next_handshake) {
TRACE_STATE("max handshake reached", QUIC_EV_CONN_INIT);
HA_ATOMIC_DEC(&qc->prx_counters->half_open_conn);
}
- /* Connection released before handshake completion. */
- if (unlikely(qc->state < QUIC_HS_ST_COMPLETE)) {
- if (!qc_is_back(qc)) {
+ /* Decrement global counters when quic_conn is deallocated.
+ * quic_conn_closed instances are not accounted as they run for a short
+ * time with limited resources.
+ */
+ _HA_ATOMIC_DEC(&global.sslconns);
+
+ if (!qc_is_back(qc)) {
+ _HA_ATOMIC_DEC(&actconn);
+
+ /* Connection released before handshake completion. */
+ if (unlikely(qc->state < QUIC_HS_ST_COMPLETE)) {
BUG_ON(qc->li->rx.quic_curr_handshake == 0);
HA_ATOMIC_DEC(&qc->li->rx.quic_curr_handshake);
}
pool_free(pool_head_quic_conn, qc);
qc = NULL;
- /* Decrement global counters when quic_conn is deallocated.
- * quic_conn_closed instances are not accounted as they run for a short
- * time with limited resources.
- */
- _HA_ATOMIC_DEC(&actconn);
- _HA_ATOMIC_DEC(&global.sslconns);
-
TRACE_PROTO("QUIC conn. freed", QUIC_EV_CONN_FREED, qc);
leave:
TRACE_LEAVE(QUIC_EV_CONN_CLOSE, qc);