mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-04 12:32:23 +00:00
BUG/MEDIUM: mux-h2: always process a pending shut read
During 2.4-dev, an issue with partial frames was fixed with commit
3d4631fec
("BUG/MEDIUM: mux-h2: fix read0 handling on partial frames").
However this patch is not completely correct. It makes h2_recv() return
0 if the connection was shut for reads, but this not make h2_io_cb()
call h2_process(), so if there are any pending data left in the demux
buffer, they will never be processed, and the I/O callback will be
called in loops forever from the poller.
The correct return value there is 1, as is done at the end of the
function to report a pending read0.
This should definitely fix issue #1328. However even after a lot of
tests I couldn't manage to reproduce it, the conditions to enter that
situation are quite racy.
This must be backported to 2.0 since the fix above was merged into
2.0.21 and 2.2.9.
This commit is contained in:
parent
e5f5948858
commit
3a8bbcc38e
@ -3689,7 +3689,7 @@ static int h2_recv(struct h2c *h2c)
|
||||
|
||||
if (h2c->flags & H2_CF_RCVD_SHUT) {
|
||||
TRACE_DEVEL("leaving on rcvd_shut", H2_EV_H2C_RECV, h2c->conn);
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!b_data(buf)) {
|
||||
|
Loading…
Reference in New Issue
Block a user