mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
MINOR: stats/htx: Call channel_add_input instead of updating channel state by hand
This way we are sure the channel state is always correctly upadated, especially the amount of data directly forwarded. For the stats applet, it is not a bug because the fast forwarding is never used (the response is chunked and the HTX extra field is always set to 0). This patch must be backported to 1.9.
This commit is contained in:
parent
e64582929f
commit
5adbeeb336
@ -245,10 +245,8 @@ static int stats_putchk(struct channel *chn, struct htx *htx, struct buffer *chk
|
||||
if (htx) {
|
||||
if (!htx_add_data(htx, ist2(chk->area, chk->data)))
|
||||
return 0;
|
||||
chn->total += chk->data;
|
||||
channel_add_input(chn, chk->data);
|
||||
chk->data = 0;
|
||||
/* notify that some data was read from the SI into the buffer */
|
||||
chn->flags |= CF_READ_PARTIAL;
|
||||
}
|
||||
else {
|
||||
if (ci_putchk(chn, chk) == -1)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user