mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-07 22:12:08 +00:00
MINOR: channel: don't unset CF_SHUTR_NOW after shutting down.
This flag is set by the stream layer to request an abort, and results in CF_SHUTR being set once the abort is performed. However by analogy with the send side, the flag was removed once the CF_SHUTR flag was set, thus we lose the information about the cause of the shutr. This is what creates the confusion that sometimes arises between client and server aborts. This patch makes sure we don't remove this flag anymore in this case. All call places only use it to perform the shutr and already check it against CF_SHUTR. So no condition needs to be updated to take this into account. Some later, more careful changes may consist in refining the conditions where we report a client reset or a server reset to ignore SHUTR when SHUTR_NOW is set so that we don't report such misleading information anymore.
This commit is contained in:
parent
f882a85da4
commit
65e04eb2bb
@ -168,7 +168,6 @@ static void stream_int_shutr(struct stream_interface *si)
|
||||
struct channel *ic = si_ic(si);
|
||||
|
||||
si_rx_shut_blk(si);
|
||||
ic->flags &= ~CF_SHUTR_NOW;
|
||||
if (ic->flags & CF_SHUTR)
|
||||
return;
|
||||
ic->flags |= CF_SHUTR;
|
||||
@ -237,7 +236,6 @@ static void stream_int_shutw(struct stream_interface *si)
|
||||
default:
|
||||
si->flags &= ~SI_FL_NOLINGER;
|
||||
si_rx_shut_blk(si);
|
||||
ic->flags &= ~CF_SHUTR_NOW;
|
||||
ic->flags |= CF_SHUTR;
|
||||
ic->rex = TICK_ETERNITY;
|
||||
si->exp = TICK_ETERNITY;
|
||||
@ -899,7 +897,6 @@ static void stream_int_shutr_conn(struct stream_interface *si)
|
||||
struct channel *ic = si_ic(si);
|
||||
|
||||
si_rx_shut_blk(si);
|
||||
ic->flags &= ~CF_SHUTR_NOW;
|
||||
if (ic->flags & CF_SHUTR)
|
||||
return;
|
||||
ic->flags |= CF_SHUTR;
|
||||
@ -1006,7 +1003,6 @@ static void stream_int_shutw_conn(struct stream_interface *si)
|
||||
default:
|
||||
si->flags &= ~SI_FL_NOLINGER;
|
||||
si_rx_shut_blk(si);
|
||||
ic->flags &= ~CF_SHUTR_NOW;
|
||||
ic->flags |= CF_SHUTR;
|
||||
ic->rex = TICK_ETERNITY;
|
||||
si->exp = TICK_ETERNITY;
|
||||
@ -1408,7 +1404,6 @@ static void stream_int_read0(struct stream_interface *si)
|
||||
struct channel *oc = si_oc(si);
|
||||
|
||||
si_rx_shut_blk(si);
|
||||
ic->flags &= ~CF_SHUTR_NOW;
|
||||
if (ic->flags & CF_SHUTR)
|
||||
return;
|
||||
ic->flags |= CF_SHUTR;
|
||||
@ -1493,7 +1488,6 @@ static void stream_int_shutr_applet(struct stream_interface *si)
|
||||
struct channel *ic = si_ic(si);
|
||||
|
||||
si_rx_shut_blk(si);
|
||||
ic->flags &= ~CF_SHUTR_NOW;
|
||||
if (ic->flags & CF_SHUTR)
|
||||
return;
|
||||
ic->flags |= CF_SHUTR;
|
||||
@ -1565,7 +1559,6 @@ static void stream_int_shutw_applet(struct stream_interface *si)
|
||||
default:
|
||||
si->flags &= ~SI_FL_NOLINGER;
|
||||
si_rx_shut_blk(si);
|
||||
ic->flags &= ~CF_SHUTR_NOW;
|
||||
ic->flags |= CF_SHUTR;
|
||||
ic->rex = TICK_ETERNITY;
|
||||
si->exp = TICK_ETERNITY;
|
||||
|
Loading…
Reference in New Issue
Block a user