summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_router_request.h
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2020-03-17 14:44:11 +0300
committerMax Romanov <max.romanov@nginx.com>2020-03-17 14:44:11 +0300
commitc6f9ca79e6a8517544a0995414de8421a9983687 (patch)
tree6c0d1faf0f64442501169803d64e5ca8a0a30d56 /src/nxt_router_request.h
parentefbcd517fc9ec1ef5a6dfe85cb79bf0a57b954c5 (diff)
downloadunit-c6f9ca79e6a8517544a0995414de8421a9983687.tar.gz
unit-c6f9ca79e6a8517544a0995414de8421a9983687.tar.bz2
Fixing body fd access racing condition.
To avoid closing the body fd prematurely, the fd value is moved from the request struct to the app link. The body fd should not be closed immediately after the request is sent to the application due to possible request rescheduling.
Diffstat (limited to '')
-rw-r--r--src/nxt_router_request.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nxt_router_request.h b/src/nxt_router_request.h
index c3d5767e..a38980ee 100644
--- a/src/nxt_router_request.h
+++ b/src/nxt_router_request.h
@@ -50,6 +50,7 @@ struct nxt_request_app_link_s {
nxt_http_request_t *request;
nxt_msg_info_t msg_info;
nxt_request_rpc_data_t *req_rpc_data;
+ nxt_fd_t body_fd;
nxt_nsec_t res_time;