summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2020-03-19 22:04:43 +0300
committerMax Romanov <max.romanov@nginx.com>2020-03-19 22:04:43 +0300
commit59e06e49101ef0eba3c4c9e351c23fa56e2137d8 (patch)
tree60699f2b0b3e6f765e703936e059e6d08c2b9271
parentc26fbbe53a1ce656e05d3e1e86d019c6173715ab (diff)
downloadunit-59e06e49101ef0eba3c4c9e351c23fa56e2137d8.tar.gz
unit-59e06e49101ef0eba3c4c9e351c23fa56e2137d8.tar.bz2
Completing buffers immediately
This fixes crash introduced in 039b00e32e3d.
Diffstat (limited to '')
-rw-r--r--src/nxt_h1proto.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nxt_h1proto.c b/src/nxt_h1proto.c
index 19b84108..abc92dd4 100644
--- a/src/nxt_h1proto.c
+++ b/src/nxt_h1proto.c
@@ -1369,14 +1369,12 @@ nxt_h1p_complete_buffers(nxt_task_t *task, nxt_h1proto_t *h1p, nxt_bool_t all)
size_t size;
nxt_buf_t *b, *in, *next;
nxt_conn_t *c;
- nxt_work_queue_t *wq;
nxt_debug(task, "h1p complete buffers");
b = h1p->buffers;
c = h1p->conn;
in = c->read;
- wq = &task->thread->engine->fast_work_queue;
if (b != NULL) {
if (in == NULL) {
@@ -1392,7 +1390,7 @@ nxt_h1p_complete_buffers(nxt_task_t *task, nxt_h1proto_t *h1p, nxt_bool_t all)
next = b->next;
b->next = NULL;
- nxt_work_queue_add(wq, b->completion_handler, task, b, b->parent);
+ b->completion_handler(task, b, b->parent);
b = next;
}
@@ -1405,8 +1403,7 @@ nxt_h1p_complete_buffers(nxt_task_t *task, nxt_h1proto_t *h1p, nxt_bool_t all)
size = nxt_buf_mem_used_size(&in->mem);
if (size == 0 || all) {
- nxt_work_queue_add(wq, in->completion_handler, task, in,
- in->parent);
+ in->completion_handler(task, in, in->parent);
c->read = NULL;
}