MEDIUM: mux-h2: slightly relax timeout management rules

The H2 timeout rules were arranged to cover complex situations In 2.1
with commit c2ea47fb1 ("BUG/MEDIUM: mux-h2: do not enforce timeout on
long connections").

It turns out that such rules while complex, do not perfectly cover all
use cases. The real intent is to say that as long as there are attached
streams, the connection must not timeout. Then once all these streams
have quit (possibly for timeout reasons) then the mux should take over
the management of timeouts.

We do have this nb_cs field which indicates the number of attached
streams, and it's updated even when leaving orphaned streams. So
checking it alone is sufficient to know whether it's the mux or the
streams that are in charge of the timeouts.

In its current state, this doesn't cause visible effects except that
it makes it impossible to implement more subtle parsing timeouts.

This would need to be backported as far as 2.0 along with the next
commit that will depend on it.

(cherry picked from commit 3439583dd64cc2b0603fd4dac73b7b9506b826bc)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit a2e750b921e22b877dabc8939f4f39300d311ab7)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed