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.
This commit is contained in:
Max Romanov
2019-03-18 19:55:34 +03:00
parent 22de5fcddf
commit f49379215a

View File

@@ -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));
}