diff --git a/src/shrpx_http2_upstream.cc b/src/shrpx_http2_upstream.cc index 0b9eaa2f..49ad33fa 100644 --- a/src/shrpx_http2_upstream.cc +++ b/src/shrpx_http2_upstream.cc @@ -573,7 +573,7 @@ Http2Upstream::Http2Upstream(ClientHandler *handler) : 0, !get_config()->http2_proxy), handler_(handler), session_(nullptr), data_pending_(nullptr), - data_pendinglen_(0), deferred_(false) { + data_pendinglen_(0) { int rv; @@ -1008,12 +1008,6 @@ ssize_t downstream_data_read_callback(nghttp2_session *session, } if (nread == 0 && ((*data_flags) & NGHTTP2_DATA_FLAG_EOF) == 0) { - // Higher priority stream is likely to be handled first and if it - // has no data to send, we'd better to break here, so that we have - // a chance to read another incoming data from backend to this - // stream. - upstream->set_deferred(true); - return NGHTTP2_ERR_DEFERRED; } @@ -1333,8 +1327,6 @@ int Http2Upstream::on_downstream_reset() { return 0; } -void Http2Upstream::set_deferred(bool f) { deferred_ = f; } - MemchunkPool4K *Http2Upstream::get_mcpool() { return &mcpool_; } } // namespace shrpx diff --git a/src/shrpx_http2_upstream.h b/src/shrpx_http2_upstream.h index 7f534e78..adaf19a3 100644 --- a/src/shrpx_http2_upstream.h +++ b/src/shrpx_http2_upstream.h @@ -97,8 +97,6 @@ public: void start_downstream(Downstream *downstream); void initiate_downstream(std::unique_ptr downstream); - void set_deferred(bool f); - private: // must be put before downstream_queue_ std::unique_ptr pre_upstream_; @@ -110,7 +108,6 @@ private: const uint8_t *data_pending_; size_t data_pendinglen_; bool flow_control_; - bool deferred_; }; } // namespace shrpx