This commit completes the previous one which implements a new setting to
limit the number of streams usable by a client on a QUIC connection.
When the connection becomes idle after reaching this limit, it is
immediately closed. This is implemented by extending checks in
qcc_is_dead(). This results in a CONNECTION_CLOSE emission, which is
useful to free resources as soon as possible.
tune.quic.fe.stream.max-total <number>
Sets the maximum number of requests that can be handled by a single QUIC
connection. Once this total is reached, the connection will be gracefully
- shutdown. In HTTP/3, this translates in a GOAWAY frame.
+ shutdown. In HTTP/3, this translates in a GOAWAY frame. The connection is
+ finally closed when all remaining transfers are completed.
This setting is applied as a hard limit on the connection via the QUIC flow
control mechanism. If a peer violates it, the connection will be immediately
* - remote error detected at transport level
* - error detected locally
* - MUX timeout expired
+ * - app layer shut and all transfers done (FE side only - used for stream.max-total)
*/
if (qcc->flags & (QC_CF_ERR_CONN|QC_CF_ERRL_DONE) ||
- !qcc->task) {
+ !qcc->task ||
+ (!conn_is_back(qcc->conn) && !qcc->nb_hreq && qcc->app_st == QCC_APP_ST_SHUT)) {
return 1;
}