diff options
Diffstat (limited to 'src/nxt_router.c')
-rw-r--r-- | src/nxt_router.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/nxt_router.c b/src/nxt_router.c index 4cf476f6..7c197a44 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -333,8 +333,6 @@ nxt_router_conf_data_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) ret = nxt_router_conf_new(task, tmcf, b->mem.pos, b->mem.free); - b->mem.pos = b->mem.free; - if (ret == NXT_OK) { nxt_router_conf_success(task, tmcf); return; @@ -1735,7 +1733,7 @@ static void nxt_router_app_data_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) { size_t dump_size; - nxt_buf_t *b, *i, *last; + nxt_buf_t *b, *last; nxt_conn_t *c; nxt_req_conn_link_t *rc; nxt_event_engine_t *engine; @@ -1748,11 +1746,6 @@ nxt_router_app_data_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) nxt_debug(task, "request id %08uxD not found", msg->port_msg.stream); - /* Mark buffers as read. */ - for (i = b; i != NULL; i = i->next) { - i->mem.pos = i->mem.free; - } - return; } @@ -1793,6 +1786,9 @@ nxt_router_app_data_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) return; } + /* Disable instant buffer completion/re-using by port. */ + msg->buf = NULL; + if (c->write == NULL) { c->write = b; c->write_state = &nxt_router_conn_write_state; |