MINOR: stream-int: relax the forwarding rules in stream_int_notify()
There currently is an optimization in stream_int_notify() consisting in not trying to forward small bits of data if extra data remain to be processed. The purpose is to avoid forwarding one chunk at a time if multiple chunks are available to be parsed at once. It consists in avoiding sending pending output data if there are still data to be parsed in the channel's buffer, since process_stream() will have the opportunity to deal with them all at once. Not only this optimization is less useful with the new way the connections work, but it even causes problems like lost events since WAIT_ROOM will not be removed. And with HTX, it will never be able to update the input buffer after the first read. Let's relax the rules now, by always sending if we don't have the CF_EXPECT_MORE flag (used to group writes), or if the buffer is already full.
This commit is contained in:
parent
6b1379fb8a
commit
89b6a2b4fd
@ -498,7 +498,7 @@ void stream_int_notify(struct stream_interface *si)
|
||||
*/
|
||||
if (!channel_is_empty(ic) &&
|
||||
(si_opposite(si)->flags & SI_FL_WAIT_DATA) &&
|
||||
(ci_data(ic) == 0 || ic->pipe)) {
|
||||
(!(ic->flags & CF_EXPECT_MORE) || c_full(ic) || ci_data(ic) == 0 || ic->pipe)) {
|
||||
int new_len, last_len;
|
||||
|
||||
last_len = co_data(ic);
|
||||
|
Loading…
x
Reference in New Issue
Block a user