]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: mux-h2: implement an outgoing stream allocator : h2c_bck_stream_new()
authorWilly Tarreau <w@1wt.eu>
Fri, 5 Oct 2018 07:35:00 +0000 (09:35 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 2 Dec 2018 12:31:51 +0000 (13:31 +0100)
commit751f2d0ddf3061e9e54fa8d82ecbf1b99e9c1dab
treea953f95c7853a519f3f73f251a72a8d71fb5d55f
parentf8957277ff16c638268c42f02e015d9dc1933694
MINOR: mux-h2: implement an outgoing stream allocator : h2c_bck_stream_new()

For the backend we'll need to allocate streams as well. Let's do this
with h2c_bck_stream_new(). The stream ID allocator was split from it
so that the caller can decide whether or not to stay on the same
connection or create a new one. It possibly isn't the best way to do
this as once we're on the mux it's too late to give up creation of a
new stream. Another approach would possibly consist in detaching muxes
that reached their connection count limit before they can be reused.

Instead of choosing the stream id as soon as the stream is created, wait
until data is about to be sent. If we don't do that, the stream may send
data out of order, and so the stream 3 may send data before the stream 1,
and then when the stream 1 will try to send data, the other end will
consider that an error, as stream ids should always be increased.

Cc: Olivier Houchard <ohouchard@haproxy.com>
src/mux_h2.c