MEDIUM: quic: respect closing state even on soft-stop

Prior to this patch, a special condition was set when idle timer was
rearmed for closing connections during haproxy process stopping. In this
case, the timeout was ditched and the idle task woken up immediatly.

The objective was to release quickly closing connections to not prevent
the process stopping to be too long. However, it is not conform with RFC
9000 recommandations and may cause some clients to miss a
CONNECTION_CLOSE in case of a packet loss.

A recent fix was set to use a shorter timeout for closing state. Now a
connection should only be left in this state for one second or less.
This reduces greatly the importance of stopping special condition. Thus,
this patch removes it completely.
This commit is contained in:
Amaury Denoyelle 2023-10-26 14:15:41 +02:00
parent 75e36c57f0
commit f549eb2b34

View File

@ -1633,12 +1633,6 @@ void qc_idle_timer_do_rearm(struct quic_conn *qc, int arm_ack)
if (!qc->idle_timer_task)
return;
if (stopping && qc->flags & (QUIC_FL_CONN_CLOSING|QUIC_FL_CONN_DRAINING)) {
TRACE_PROTO("executing idle timer immediately on stopping", QUIC_EV_CONN_IDLE_TIMER, qc);
qc->ack_expire = TICK_ETERNITY;
task_wakeup(qc->idle_timer_task, TASK_WOKEN_MSG);
}
else {
if (qc->flags & (QUIC_FL_CONN_CLOSING|QUIC_FL_CONN_DRAINING)) {
/* RFC 9000 10.2. Immediate Close
*
@ -1648,9 +1642,9 @@ void qc_idle_timer_do_rearm(struct quic_conn *qc, int arm_ack)
* times the current PTO interval as defined in [QUIC-RECOVERY].
*/
/* Delay is limited to 1s which should cover most of
* network conditions. The process should not be
* impacted by a connection with a high RTT.
/* Delay is limited to 1s which should cover most of network
* conditions. The process should not be impacted by a
* connection with a high RTT.
*/
expire = MIN(3 * quic_pto(qc), 1000);
}
@ -1681,7 +1675,6 @@ void qc_idle_timer_do_rearm(struct quic_conn *qc, int arm_ack)
task_queue(qc->idle_timer_task);
TRACE_PROTO("idle timer armed", QUIC_EV_CONN_IDLE_TIMER, qc);
}
}
}
/* Rearm the idle timer or ack timer for <qc> QUIC connection depending on <read>