Revert "BUG/MINOR: stream-int: Don't block reads in si_update_rx() if chn may receive"

This reverts commit e0dec4b7b258101f6d5faa15234103a45c16f0f8.

At first glance, channel_is_empty() was used on purpose in si_update_rx(),
because of the HTX ("b3e0de46c" MEDIUM: stream-int: Rely only on
SI_FL_WAIT_ROOM to stop data receipt). It is not pretty clear for now why
channel_may_recv() sould not be used here but this change introduce a
possible infinite loop with the stats applet. So, it is safer to revert the
patch, waiting for a better understanding of the probelm.

This means the abortonclose option will be broken again on the 2.3 and lower
versions.

This patch should fix the issue #1360. It must be backported as far as 2.0.
This commit is contained in:
Christopher Faulet 2021-09-07 14:31:02 +02:00
parent 3b69886f7d
commit b7308f00cb

View File

@ -838,7 +838,7 @@ void si_update_rx(struct stream_interface *si)
else
si_rx_chan_rdy(si);
if (!channel_may_recv(ic)) {
if (!channel_is_empty(ic)) {
/* stop reading, imposed by channel's policy or contents */
si_rx_room_blk(si);
}