nghttpx: Set nghttp2_option_set_peer_max_concurrent_streams for HTTP/2 backend

This commit is contained in:
Tatsuhiro Tsujikawa 2015-02-05 00:51:14 +09:00
parent b2fb888363
commit 7c75d9db98
3 changed files with 8 additions and 2 deletions

View File

@ -761,8 +761,13 @@ void fill_default_config() {
mod_config()->worker_frontend_connections = 0; mod_config()->worker_frontend_connections = 0;
nghttp2_option_new(&mod_config()->http2_option); nghttp2_option_new(&mod_config()->http2_option);
nghttp2_option_set_no_auto_window_update(get_config()->http2_option, 1);
nghttp2_option_set_no_auto_window_update(mod_config()->http2_option, 1); nghttp2_option_new(&mod_config()->http2_client_option);
nghttp2_option_set_no_auto_window_update(get_config()->http2_client_option,
1);
nghttp2_option_set_peer_max_concurrent_streams(
get_config()->http2_client_option, 100);
mod_config()->tls_proto_mask = 0; mod_config()->tls_proto_mask = 0;
mod_config()->no_location_rewrite = false; mod_config()->no_location_rewrite = false;

View File

@ -236,6 +236,7 @@ struct Config {
FILE *http2_upstream_dump_request_header; FILE *http2_upstream_dump_request_header;
FILE *http2_upstream_dump_response_header; FILE *http2_upstream_dump_response_header;
nghttp2_option *http2_option; nghttp2_option *http2_option;
nghttp2_option *http2_client_option;
char **argv; char **argv;
char *cwd; char *cwd;
size_t num_worker; size_t num_worker;

View File

@ -1202,7 +1202,7 @@ int Http2Session::on_connect() {
} }
rv = nghttp2_session_client_new2(&session_, callbacks, this, rv = nghttp2_session_client_new2(&session_, callbacks, this,
get_config()->http2_option); get_config()->http2_client_option);
if (rv != 0) { if (rv != 0) {
return -1; return -1;