diff options
author | Igor Sysoev <igor@sysoev.ru> | 2018-04-03 16:28:26 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2018-04-03 16:28:26 +0300 |
commit | fa04c05aa0e67e6964ab006935f939c6b27754a3 (patch) | |
tree | 969d3dac0bda996a487dc6e58e3b1e2ef7f91946 /src/nxt_sendbuf.c | |
parent | 151160c1103166810daddf1e9cc7135cb6ccc321 (diff) | |
download | unit-fa04c05aa0e67e6964ab006935f939c6b27754a3.tar.gz unit-fa04c05aa0e67e6964ab006935f939c6b27754a3.tar.bz2 |
HTTP: using r->mem_pool retention counter for response buffers.
Diffstat (limited to 'src/nxt_sendbuf.c')
-rw-r--r-- | src/nxt_sendbuf.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/nxt_sendbuf.c b/src/nxt_sendbuf.c index ed6fca36..16fe4724 100644 --- a/src/nxt_sendbuf.c +++ b/src/nxt_sendbuf.c @@ -382,7 +382,7 @@ nxt_sendbuf_completion(nxt_task_t *task, nxt_work_queue_t *wq, nxt_buf_t *b) nxt_prefetch(b->next); - if (nxt_buf_used_size(b) != 0) { + if (!nxt_buf_is_sync(b) && nxt_buf_used_size(b) != 0) { break; } @@ -393,3 +393,16 @@ nxt_sendbuf_completion(nxt_task_t *task, nxt_work_queue_t *wq, nxt_buf_t *b) return b; } + + +void +nxt_sendbuf_drain(nxt_task_t *task, nxt_work_queue_t *wq, nxt_buf_t *b) +{ + while (b != NULL) { + nxt_prefetch(b->next); + + nxt_work_queue_add(wq, b->completion_handler, task, b, b->parent); + + b = b->next; + } +} |