]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: h2: fix incorrect timeout handling on the connection
authorWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 18:21:06 +0000 (19:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 18:21:06 +0000 (19:21 +0100)
commit3f133570b862009c6100b6cc740519b8cfb2c420
tree43b3fe5f51b40a6d6536c4560dc79c8ef1f06d2b
parentea39282e851c70ec9d192771deb7d949533fe6a2
BUG/MEDIUM: h2: fix incorrect timeout handling on the connection

Previous commit ea3928 (MEDIUM: h2: apply a timeout to h2 connections)
was wrong for two reasons. The first one is that if the client timeout
is not set, it's used as zero, preventing connections from establishing.
The second reason is that if the timeout triggers with active streams
(normally it should not since the task is supposed to be disabled), the
task is removed (h2c->task=NULL), and the last quitting stream might
try to dereference it.

Instead of doing this, we simply not register the task if there's no
timeout (it's useless) and we always control its presence in the streams.
src/mux_h2.c