summaryrefslogtreecommitdiffstats
path: root/src/shrpx_http2_upstream.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:53:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:53:16 +0000
commitfef16cb88298ba07a9841a5a98e5afaa48bcb6d6 (patch)
tree4c895c4ad1fdad31773ded63e5a1effb74185315 /src/shrpx_http2_upstream.cc
parentReleasing progress-linux version 1.60.0-1~progress7.99u1. (diff)
downloadnghttp2-fef16cb88298ba07a9841a5a98e5afaa48bcb6d6.tar.xz
nghttp2-fef16cb88298ba07a9841a5a98e5afaa48bcb6d6.zip
Merging upstream version 1.61.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shrpx_http2_upstream.cc')
-rw-r--r--src/shrpx_http2_upstream.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/shrpx_http2_upstream.cc b/src/shrpx_http2_upstream.cc
index 2cb5436..7816f5f 100644
--- a/src/shrpx_http2_upstream.cc
+++ b/src/shrpx_http2_upstream.cc
@@ -285,7 +285,10 @@ void Http2Upstream::on_start_request(const nghttp2_frame *frame) {
downstream->reset_upstream_rtimer();
- handler_->repeat_read_timer();
+ auto config = get_config();
+ auto &httpconf = config->http;
+
+ handler_->reset_upstream_read_timeout(httpconf.timeout.header);
auto &req = downstream->request();
@@ -298,8 +301,6 @@ void Http2Upstream::on_start_request(const nghttp2_frame *frame) {
++num_requests_;
- auto config = get_config();
- auto &httpconf = config->http;
if (httpconf.max_requests <= num_requests_) {
start_graceful_shutdown();
}
@@ -1132,7 +1133,7 @@ Http2Upstream::Http2Upstream(ClientHandler *handler)
#endif // defined(TCP_INFO) && defined(TCP_NOTSENT_LOWAT)
handler_->reset_upstream_read_timeout(
- config->conn.upstream.timeout.http2_read);
+ config->conn.upstream.timeout.http2_idle);
handler_->signal_write();
}
@@ -1640,7 +1641,10 @@ void Http2Upstream::remove_downstream(Downstream *downstream) {
if (downstream_queue_.get_downstreams() == nullptr) {
// There is no downstream at the moment. Start idle timer now.
- handler_->repeat_read_timer();
+ auto config = get_config();
+ auto &upstreamconf = config->conn.upstream;
+
+ handler_->reset_upstream_read_timeout(upstreamconf.timeout.http2_idle);
}
}