nghttpx: Use default connection window size with window size optimization

This commit is contained in:
Tatsuhiro Tsujikawa 2016-09-10 16:45:04 +09:00
parent f5a2f1da25
commit 20c39fa843
1 changed files with 7 additions and 3 deletions

View File

@ -957,8 +957,12 @@ Http2Upstream::Http2Upstream(ClientHandler *handler)
<< nghttp2_strerror(rv); << nghttp2_strerror(rv);
} }
auto window_size = faddr->alt_mode auto window_size =
faddr->alt_mode
? std::numeric_limits<int32_t>::max() ? std::numeric_limits<int32_t>::max()
: http2conf.upstream.optimize_window_size
? std::min(http2conf.upstream.connection_window_size,
NGHTTP2_INITIAL_CONNECTION_WINDOW_SIZE)
: http2conf.upstream.connection_window_size; : http2conf.upstream.connection_window_size;
rv = nghttp2_session_set_local_window_size(session_, NGHTTP2_FLAG_NONE, 0, rv = nghttp2_session_set_local_window_size(session_, NGHTTP2_FLAG_NONE, 0,