mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-31 18:41:39 +00:00
BUG/MEDIUM: stream: Don't request a server connection if a shutw was scheduled
If a shutdown for writes was performed on the client side (CF_SHUTW is set on the request channel) while the server connection is still unestablished (the stream-int is in the state SI_ST_INI), then it is aborted. It must also be aborted when the shudown for write is pending (only CF_SHUTW_NOW is set). Otherwise, some errors on the request channel can be ignored, leaving the stream in an undefined state. This patch must be backported to 1.9. It may probably be backported to all suported versions, but it is unclear if the bug is visbile for older versions than 1.9. So it is probably safer to wait bug reports on these versions to backport this patch.
This commit is contained in:
parent
e84289e585
commit
c54e4b053d
@ -2267,7 +2267,7 @@ redo:
|
||||
* - the CF_AUTO_CONNECT flag is set (active connection)
|
||||
*/
|
||||
if (si_b->state == SI_ST_INI) {
|
||||
if (!(req->flags & CF_SHUTW)) {
|
||||
if (!(req->flags & (CF_SHUTW|CF_SHUTW_NOW))) {
|
||||
if ((req->flags & CF_AUTO_CONNECT) || !channel_is_empty(req)) {
|
||||
/* If we have an appctx, there is no connect method, so we
|
||||
* immediately switch to the connected state, otherwise we
|
||||
|
Loading…
Reference in New Issue
Block a user