mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
MEDIUM: stream: allocate without queuing when retrying
Now when trying to allocate the work buffer, we can check if we've been notified of availability via the buf_wait callback, in which case we should not consult the queue, or if we're doing a first allocation and check the queue.
This commit is contained in:
parent
f552f79ba5
commit
b5714b45e8
@ -749,7 +749,7 @@ void stream_free(struct stream *s)
|
|||||||
*/
|
*/
|
||||||
static int stream_alloc_work_buffer(struct stream *s)
|
static int stream_alloc_work_buffer(struct stream *s)
|
||||||
{
|
{
|
||||||
if (b_alloc(&s->res.buf, DB_CHANNEL)) {
|
if (b_alloc(&s->res.buf, DB_CHANNEL | ((s->flags & SF_MAYALLOC) ? DB_F_NOQUEUE : 0))) {
|
||||||
s->flags &= ~SF_MAYALLOC;
|
s->flags &= ~SF_MAYALLOC;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user