Repository: trafficserver Updated Branches: refs/heads/master 64b9e67b6 -> 2aae7251b
TS-4162: Add proxy.config.http2.active_timeout_in Current default value is 0 for compatibility with existing 6.x code. This is going to be changed by TS-4167 in 7.0.0. This closes #444 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/2aae7251 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/2aae7251 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/2aae7251 Branch: refs/heads/master Commit: 2aae7251b793c9db3cb3ddd71f666e872522732f Parents: 64b9e67 Author: Masaori Koshiba <masa...@apache.org> Authored: Fri Jan 29 18:35:55 2016 +0900 Committer: Masaori Koshiba <mkosh...@yahoo-corp.jp> Committed: Tue Feb 2 10:30:52 2016 +0900 ---------------------------------------------------------------------- mgmt/RecordsConfig.cc | 2 ++ proxy/http2/HTTP2.cc | 2 ++ proxy/http2/HTTP2.h | 1 + proxy/http2/Http2ClientSession.cc | 1 + 4 files changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2aae7251/mgmt/RecordsConfig.cc ---------------------------------------------------------------------- diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc index 9eea1b3..553476e 100644 --- a/mgmt/RecordsConfig.cc +++ b/mgmt/RecordsConfig.cc @@ -1995,6 +1995,8 @@ static const RecordElement RecordsConfig[] = , {RECT_CONFIG, "proxy.config.http2.no_activity_timeout_in", RECD_INT, "115", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL} , + {RECT_CONFIG, "proxy.config.http2.active_timeout_in", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL} + , //# Add LOCAL Records Here {RECT_LOCAL, "proxy.local.incoming_ip_to_bind", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2aae7251/proxy/http2/HTTP2.cc ---------------------------------------------------------------------- diff --git a/proxy/http2/HTTP2.cc b/proxy/http2/HTTP2.cc index 4f1fb4b..5cb9d79 100644 --- a/proxy/http2/HTTP2.cc +++ b/proxy/http2/HTTP2.cc @@ -735,6 +735,7 @@ uint32_t Http2::max_header_list_size = 4294967295; uint32_t Http2::max_request_header_size = 131072; uint32_t Http2::accept_no_activity_timeout = 120; uint32_t Http2::no_activity_timeout_in = 115; +uint32_t Http2::active_timeout_in = 0; void Http2::init() @@ -747,6 +748,7 @@ Http2::init() REC_EstablishStaticConfigInt32U(max_request_header_size, "proxy.config.http.request_header_max_size"); REC_EstablishStaticConfigInt32U(accept_no_activity_timeout, "proxy.config.http2.accept_no_activity_timeout"); REC_EstablishStaticConfigInt32U(no_activity_timeout_in, "proxy.config.http2.no_activity_timeout_in"); + REC_EstablishStaticConfigInt32U(active_timeout_in, "proxy.config.http2.active_timeout_in"); // If any settings is broken, ATS should not start ink_release_assert(http2_settings_parameter_is_valid({HTTP2_SETTINGS_MAX_CONCURRENT_STREAMS, max_concurrent_streams}) && http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2aae7251/proxy/http2/HTTP2.h ---------------------------------------------------------------------- diff --git a/proxy/http2/HTTP2.h b/proxy/http2/HTTP2.h index 814b42e..ebac76f 100644 --- a/proxy/http2/HTTP2.h +++ b/proxy/http2/HTTP2.h @@ -350,6 +350,7 @@ public: static uint32_t max_request_header_size; static uint32_t accept_no_activity_timeout; static uint32_t no_activity_timeout_in; + static uint32_t active_timeout_in; static void init(); }; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2aae7251/proxy/http2/Http2ClientSession.cc ---------------------------------------------------------------------- diff --git a/proxy/http2/Http2ClientSession.cc b/proxy/http2/Http2ClientSession.cc index ccad11f..4750111 100644 --- a/proxy/http2/Http2ClientSession.cc +++ b/proxy/http2/Http2ClientSession.cc @@ -295,6 +295,7 @@ Http2ClientSession::state_read_connection_preface(int event, void *edata) HTTP2_SET_SESSION_HANDLER(&Http2ClientSession::state_start_frame_read); client_vc->set_inactivity_timeout(HRTIME_SECONDS(Http2::no_activity_timeout_in)); + client_vc->set_active_timeout(HRTIME_SECONDS(Http2::active_timeout_in)); // XXX start the write VIO ...