mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
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.
This commit is contained in:
parent
585744bf2e
commit
8ff5a8d87f
@ -947,7 +947,7 @@ static void stream_int_chk_snd_conn(struct stream_interface *si)
|
||||
!(si->flags & SI_FL_WAIT_DATA)) /* not waiting for data */
|
||||
return;
|
||||
|
||||
if (conn->flags & (CO_FL_DATA_WR_ENA|CO_FL_CURR_WR_ENA)) {
|
||||
if (conn->flags & CO_FL_DATA_WR_ENA) {
|
||||
/* already subscribed to write notifications, will be called
|
||||
* anyway, so let's avoid calling it especially if the reader
|
||||
* is not ready.
|
||||
|
Loading…
Reference in New Issue
Block a user