]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stream-int: don't check the CO_FL_CURR_WR_ENA flag
authorWilly Tarreau <w@1wt.eu>
Tue, 29 Aug 2017 14:40:59 +0000 (16:40 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Aug 2017 05:03:34 +0000 (07:03 +0200)
commit8ff5a8d87fa99f3e9bbc2b7d68f922fcc0fedd31
treeb8eb7f7bdcf02cc2a78d4337cb37baf8850a84e4
parent585744bf2ecf05a0761c2be10ebf866648491cd3
BUG/MINOR: stream-int: don't check the CO_FL_CURR_WR_ENA flag

The stream interface chk_snd() code checks if the connection has already
subscribed to write events in order to avoid attempting a useless write()
which will fail. But it used to check both the CO_FL_CURR_WR_ENA and the
CO_FL_DATA_WR_ENA flags, while the former may only be present without the
latterif either the other side just disabled writing did not synchronize
yet (which is harmless) or if it's currently performing a handshake, which
is being checked by the next condition and will be better dealt with by
properly subscribing to the data events.

This code was added back in 1.5-dev20 to limit the number of useless calls
to splice() but both flags were checked at once while only CO_FL_DATA_WR_ENA
was needed. This bug seems to have no impact other than making code changes
more painful. This fix may be backported down to 1.5 though is unlikely to
be needed there.
src/stream_interface.c