nghttpx: Remove flow control error detection code

Now flow control error detection is handled by the library
This commit is contained in:
Tatsuhiro Tsujikawa 2013-10-29 22:00:31 +09:00
parent a4cf37306a
commit 0ced4741d2
2 changed files with 0 additions and 30 deletions

View File

@ -309,22 +309,6 @@ int on_data_chunk_recv_callback(nghttp2_session *session,
}
if(upstream->get_flow_control()) {
downstream->inc_recv_window_size(len);
// In case that user specified initial window size is smaller
// than default one and avoid stream tear down for the first
// request due to race condition, we allow at least default
// initial window size.
if(downstream->get_recv_window_size() >
std::max(NGHTTP2_INITIAL_WINDOW_SIZE,
upstream->get_initial_window_size())) {
if(LOG_ENABLED(INFO)) {
ULOG(INFO, upstream) << "Flow control error: recv_window_size="
<< downstream->get_recv_window_size()
<< ", initial_window_size="
<< upstream->get_initial_window_size();
}
upstream->rst_stream(downstream, NGHTTP2_FLOW_CONTROL_ERROR);
return 0;
}
}
if(flags & NGHTTP2_FLAG_END_STREAM) {
downstream->set_request_state(Downstream::MSG_COMPLETE);

View File

@ -925,20 +925,6 @@ int on_data_chunk_recv_callback(nghttp2_session *session,
if(spdy->get_flow_control()) {
sd->dconn->inc_recv_window_size(len);
if(sd->dconn->get_recv_window_size() >
std::max(NGHTTP2_INITIAL_WINDOW_SIZE,
spdy->get_initial_window_size())) {
if(LOG_ENABLED(INFO)) {
SSLOG(INFO, spdy) << "Flow control error: recv_window_size="
<< sd->dconn->get_recv_window_size()
<< ", initial_window_size="
<< spdy->get_initial_window_size();
}
spdy->submit_rst_stream(stream_id, NGHTTP2_FLOW_CONTROL_ERROR);
downstream->set_response_state(Downstream::MSG_RESET);
call_downstream_readcb(spdy, downstream);
return 0;
}
}
auto upstream = downstream->get_upstream();