diff options
author | Max Romanov <max.romanov@nginx.com> | 2019-03-18 19:55:34 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2019-03-18 19:55:34 +0300 |
commit | f49379215a0177ebf14aab7185bdbf8bc2f76f47 (patch) | |
tree | 9ecabfe7f971ca8ccaf49344c97e4a79d7e23dcb /src/nxt_http_request.c | |
parent | 22de5fcddfacd8d241ae2926125e0151b9e6e651 (diff) | |
download | unit-f49379215a0177ebf14aab7185bdbf8bc2f76f47.tar.gz unit-f49379215a0177ebf14aab7185bdbf8bc2f76f47.tar.bz2 |
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.
Diffstat (limited to 'src/nxt_http_request.c')
-rw-r--r-- | src/nxt_http_request.c | 2 |
1 files changed, 2 insertions, 0 deletions
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)); } |