From 686f5b1436a318135f288b563cb6e97fcdc9d8f8 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Fri, 16 Aug 2019 14:55:18 +0300 Subject: Changing the sequence of body send execution. Request state ready_handler required for further websocket events processing. It is not required for regular response transferring. --- src/nxt_http_error.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/nxt_http_error.c') diff --git a/src/nxt_http_error.c b/src/nxt_http_error.c index 99d27903..c7c7e81a 100644 --- a/src/nxt_http_error.c +++ b/src/nxt_http_error.c @@ -51,9 +51,12 @@ nxt_http_request_error(nxt_task_t *task, nxt_http_request_t *r, r->resp.content_length = NULL; r->resp.content_length_n = nxt_length(error); + nxt_http_request_header_send(task, r); + r->state = &nxt_http_request_send_error_body_state; - nxt_http_request_header_send(task, r); + nxt_work_queue_add(&task->thread->engine->fast_work_queue, + nxt_http_request_send_error_body, task, r, NULL); return; fail: @@ -65,7 +68,6 @@ fail: static const nxt_http_request_state_t nxt_http_request_send_error_body_state nxt_aligned(64) = { - .ready_handler = nxt_http_request_send_error_body, .error_handler = nxt_http_request_error_handler, }; -- cgit