mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-20 00:10:41 -05:00
BUG/MEDIUM: stream: Report write timeouts before testing the flags
A regression was introduced when stream's timeouts were refactored. Write timeouts are not testing is the right order. When timeous of the front SC are handled, we must then test the read timeout on the request channel and the write timeout on the response channel. But write timeout is tested on the request channel instead. On the back SC, the same mix-up is performed. We must be careful to handle timeouts before checking channel flags. To avoid any confusions, all timeuts are handled first, on front and back SCs. Then flags of the both channels are tested. It is a 2.8-specific issue. No backport needed.
This commit is contained in:
parent
925279ccf2
commit
915ba08b57
1 changed files with 3 additions and 3 deletions
|
|
@ -1578,6 +1578,9 @@ static void stream_handle_timeouts(struct stream *s)
|
|||
|
||||
sc_check_timeouts(s->scf);
|
||||
channel_check_timeout(&s->req);
|
||||
sc_check_timeouts(s->scb);
|
||||
channel_check_timeout(&s->res);
|
||||
|
||||
if (unlikely(!(s->scb->flags & SC_FL_SHUTW) && (s->req.flags & CF_WRITE_TIMEOUT))) {
|
||||
s->scb->flags |= SC_FL_NOLINGER;
|
||||
sc_shutw(s->scb);
|
||||
|
|
@ -1588,9 +1591,6 @@ static void stream_handle_timeouts(struct stream *s)
|
|||
s->scf->flags |= SC_FL_NOLINGER;
|
||||
sc_shutr(s->scf);
|
||||
}
|
||||
|
||||
sc_check_timeouts(s->scb);
|
||||
channel_check_timeout(&s->res);
|
||||
if (unlikely(!(s->scf->flags & SC_FL_SHUTW) && (s->res.flags & CF_WRITE_TIMEOUT))) {
|
||||
s->scf->flags |= SC_FL_NOLINGER;
|
||||
sc_shutw(s->scf);
|
||||
|
|
|
|||
Loading…
Reference in a new issue