mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-03-16 04:22:07 +01:00
MEDIUM: stream: Offer buffers of default size only
Check the channels buffers size on release before trying to offer it to waiting entities. Only normal buffers must be considered. This will be mandatory when the large buffers support on channels will be added.
This commit is contained in:
parent
16586399e1
commit
2291219d84
@ -658,7 +658,7 @@ void stream_free(struct stream *s)
|
||||
b_dequeue(&s->buffer_wait);
|
||||
|
||||
if (s->req.buf.size || s->res.buf.size) {
|
||||
int count = !!s->req.buf.size + !!s->res.buf.size;
|
||||
int count = (s->req.buf.size == global.tune.bufsize) + (s->res.buf.size == global.tune.bufsize);
|
||||
|
||||
b_free(&s->req.buf);
|
||||
b_free(&s->res.buf);
|
||||
@ -807,11 +807,13 @@ void stream_release_buffers(struct stream *s)
|
||||
int offer = 0;
|
||||
|
||||
if (c_size(&s->req) && c_empty(&s->req)) {
|
||||
offer++;
|
||||
if (c_size(&s->req) == global.tune.bufsize)
|
||||
offer++;
|
||||
b_free(&s->req.buf);
|
||||
}
|
||||
if (c_size(&s->res) && c_empty(&s->res)) {
|
||||
offer++;
|
||||
if (c_size(&s->res) == global.tune.bufsize)
|
||||
offer++;
|
||||
b_free(&s->res.buf);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user