diff --git a/src/shrpx_http2_downstream_connection.cc b/src/shrpx_http2_downstream_connection.cc index 18de7e78..bb7e60dc 100644 --- a/src/shrpx_http2_downstream_connection.cc +++ b/src/shrpx_http2_downstream_connection.cc @@ -479,8 +479,7 @@ int Http2DownstreamConnection::resume_read(IOCtrlReason reason, size_t consumed) { int rv; - if (http2session_->get_state() != Http2Session::CONNECTED || - !http2session_->get_flow_control()) { + if (http2session_->get_state() != Http2Session::CONNECTED) { return 0; } diff --git a/src/shrpx_http2_session.cc b/src/shrpx_http2_session.cc index 6d5f4d43..1ad416fb 100644 --- a/src/shrpx_http2_session.cc +++ b/src/shrpx_http2_session.cc @@ -197,8 +197,7 @@ Http2Session::Http2Session(struct ev_loop *loop, SSL_CTX *ssl_ctx, session_(nullptr), state_(DISCONNECTED), connection_check_state_(CONNECTION_CHECK_NONE), - freelist_zone_(FREELIST_ZONE_NONE), - flow_control_(false) { + freelist_zone_(FREELIST_ZONE_NONE) { read_ = write_ = &Http2Session::noop; on_read_ = &Http2Session::read_noop; @@ -675,8 +674,6 @@ int Http2Session::submit_rst_stream(int32_t stream_id, uint32_t error_code) { nghttp2_session *Http2Session::get_session() const { return session_; } -bool Http2Session::get_flow_control() const { return flow_control_; } - int Http2Session::resume_data(Http2DownstreamConnection *dconn) { assert(state_ == CONNECTED); auto downstream = dconn->get_downstream(); @@ -1525,8 +1522,6 @@ int Http2Session::connection_made() { return -1; } - flow_control_ = true; - std::array entry; size_t nentry = 2; entry[0].settings_id = NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS; diff --git a/src/shrpx_http2_session.h b/src/shrpx_http2_session.h index a3b0a223..615b1020 100644 --- a/src/shrpx_http2_session.h +++ b/src/shrpx_http2_session.h @@ -96,8 +96,6 @@ public: nghttp2_session *get_session() const; - bool get_flow_control() const; - int resume_data(Http2DownstreamConnection *dconn); int connection_made(); @@ -264,7 +262,6 @@ private: int state_; int connection_check_state_; int freelist_zone_; - bool flow_control_; }; nghttp2_session_callbacks *create_http2_downstream_callbacks();