Skip to content

Commit

Permalink
BUG/MEDIUM: stconn: Don't block sends if there is a pending shutdown
Browse files Browse the repository at this point in the history
For the same reason than the previous patch, we must not block the sends
when there is a pending shutdown. In other words, we must consider the sends
are allowed when there is a pending shutdown.

This patch must slowly be backported as far as 2.2. It should partially fix
issue #2249.
  • Loading branch information
capflam committed Sep 1, 2023
1 parent 0b93ff8 commit b50a471
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/haproxy/sc_strm.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ static inline int sc_is_send_allowed(const struct stconn *sc)
{
if (sc->flags & SC_FL_SHUT_DONE)
return 0;
if (sc->flags & SC_FL_SHUT_WANTED)
return 1;

return !sc_ep_test(sc, SE_FL_WAIT_DATA | SE_FL_WONT_CONSUME);
}
Expand Down

0 comments on commit b50a471

Please sign in to comment.