aboutsummaryrefslogtreecommitdiff
path: root/lib/http2.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-05-11 11:41:10 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-05-18 09:33:47 +0200
commit72105ebf0565761c38805ba699b25d8c5520ffb0 (patch)
treecec40ae439d767db5546042f51dcd8e152c1cfe1 /lib/http2.c
parent38bd6bf0bb4ffc031c8d810f103d6ec1bc7fbb90 (diff)
http2: set default concurrency, fix ConnectionExists for multiplex
Diffstat (limited to 'lib/http2.c')
-rw-r--r--lib/http2.c13
1 files changed, 13 insertions, 0 deletions
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;
}