From 72105ebf0565761c38805ba699b25d8c5520ffb0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 11 May 2015 11:41:10 +0200 Subject: http2: set default concurrency, fix ConnectionExists for multiplex --- lib/http2.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/http2.c') diff --git a/lib/http2.c b/lib/http2.c index 7e58a7897..c6efc21c8 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -93,6 +93,13 @@ static CURLcode http2_disconnect(struct connectdata *conn, return CURLE_OK; } +/* called from Curl_http_setup_conn */ +void Curl_http2_setup_conn(struct connectdata *conn) +{ + conn->proto.httpc.settings.max_concurrent_streams = + DEFAULT_MAX_CONCURRENT_STREAMS; +} + /* * HTTP2 handler interface. This isn't added to the general list of protocols * but will be used at run-time when the protocol is dynamically switched from @@ -302,6 +309,9 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame, httpc->settings.max_concurrent_streams)); DEBUGF(infof(conn->data, "ENABLE_PUSH == %s\n", httpc->settings.enable_push?"TRUE":"false")); + infof(conn->data, + "Connection state changed (MAX_CONCURRENT_STREAMS updated)!\n"); + Curl_multi_connchanged(conn->data->multi); break; default: DEBUGF(infof(conn->data, "Got frame type %x for stream %x!\n", @@ -1198,6 +1208,9 @@ CURLcode Curl_http2_setup(struct connectdata *conn) conn->httpversion = 20; conn->bundle->multiuse = BUNDLE_MULTIPLEX; + infof(conn->data, "Connection state changed (HTTP/2 confirmed)\n"); + Curl_multi_connchanged(conn->data->multi); + return CURLE_OK; } -- cgit v1.2.3