summaryrefslogtreecommitdiff
path: root/lib/http2.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-02-11 17:25:48 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-02-12 14:40:37 +0100
commit61496154ce8a6a24213cf3e8d4efcf2378dd4fc0 (patch)
tree47af7d1e5480f1af51c50ccc12793155a9aae0ab /lib/http2.c
parent4854b344e79babe1c7741fe94ac8d3efa12f26dc (diff)
downloadcurl-61496154ce8a6a24213cf3e8d4efcf2378dd4fc0.tar.gz
http2: multi_connchanged() moved from multi.c, only used for h2
Closes #3557
Diffstat (limited to 'lib/http2.c')
-rw-r--r--lib/http2.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/http2.c b/lib/http2.c
index ae6373317..2884c7152 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -618,6 +618,18 @@ static int push_promise(struct Curl_easy *data,
return rv;
}
+/*
+ * multi_connchanged() is called to tell that there is a connection in
+ * this multi handle that has changed state (pipelining become possible, the
+ * number of allowed streams changed or similar), and a subsequent use of this
+ * multi handle should move CONNECT_PEND handles back to CONNECT to have them
+ * retry.
+ */
+static void multi_connchanged(struct Curl_multi *multi)
+{
+ multi->recheckstate = TRUE;
+}
+
static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame,
void *userp)
{
@@ -650,7 +662,7 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame,
infof(conn->data,
"Connection state changed (MAX_CONCURRENT_STREAMS == %u)!\n",
httpc->settings.max_concurrent_streams);
- Curl_multi_connchanged(conn->data->multi);
+ multi_connchanged(conn->data->multi);
}
}
return 0;
@@ -2163,7 +2175,7 @@ CURLcode Curl_http2_setup(struct connectdata *conn)
conn->bundle->multiuse = BUNDLE_MULTIPLEX;
infof(conn->data, "Connection state changed (HTTP/2 confirmed)\n");
- Curl_multi_connchanged(conn->data->multi);
+ multi_connchanged(conn->data->multi);
return CURLE_OK;
}