From f49379215a0177ebf14aab7185bdbf8bc2f76f47 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Mon, 18 Mar 2019 19:55:34 +0300 Subject: [PATCH] Setting request error flag in error handler. Absence of this flag is the reason of memory leak in case when client disconnected before receiving all response data. --- src/nxt_http_request.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nxt_http_request.c b/src/nxt_http_request.c index 3c763dd0..7ba2dfd5 100644 --- a/src/nxt_http_request.c +++ b/src/nxt_http_request.c @@ -523,6 +523,8 @@ nxt_http_request_error_handler(nxt_task_t *task, void *obj, void *data) nxt_debug(task, "http request error handler"); + r->error = 1; + if (proto.any != NULL) { nxt_http_proto_discard[r->protocol](task, r, nxt_http_buf_last(r)); }