From a224aba577aa517376e5f3921e0b6fcbc143ac69 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 21 May 2016 13:18:22 +0900 Subject: [PATCH] nghttpx: No need to check activeness of SETTINGS ACK timer We don't have to check activeness of SETTINGS ACK timer since we only send SETTINGS frame without ACK only once per session at the moment. --- src/shrpx_http2_session.cc | 4 ---- src/shrpx_http2_upstream.cc | 3 --- src/shrpx_live_check.cc | 4 ---- 3 files changed, 11 deletions(-) diff --git a/src/shrpx_http2_session.cc b/src/shrpx_http2_session.cc index ba72a2c2..6107276b 100644 --- a/src/shrpx_http2_session.cc +++ b/src/shrpx_http2_session.cc @@ -756,10 +756,6 @@ int on_stream_close_callback(nghttp2_session *session, int32_t stream_id, } // namespace void Http2Session::start_settings_timer() { - if (ev_is_active(&settings_timer_)) { - return; - } - ev_timer_again(conn_.loop, &settings_timer_); } diff --git a/src/shrpx_http2_upstream.cc b/src/shrpx_http2_upstream.cc index 6ee1acab..0021c1d3 100644 --- a/src/shrpx_http2_upstream.cc +++ b/src/shrpx_http2_upstream.cc @@ -146,9 +146,6 @@ int Http2Upstream::upgrade_upstream(HttpsUpstream *http) { } void Http2Upstream::start_settings_timer() { - if (ev_is_active(&settings_timer_)) { - return; - } ev_timer_start(handler_->get_loop(), &settings_timer_); } diff --git a/src/shrpx_live_check.cc b/src/shrpx_live_check.cc index fc2cc4a2..5cb687e0 100644 --- a/src/shrpx_live_check.cc +++ b/src/shrpx_live_check.cc @@ -620,10 +620,6 @@ void LiveCheck::on_success() { int LiveCheck::noop() { return 0; } void LiveCheck::start_settings_timer() { - if (ev_is_active(&settings_timer_)) { - return; - } - ev_timer_set(&settings_timer_, 10., 0.); ev_timer_start(conn_.loop, &settings_timer_); }