mirror of
https://github.com/moparisthebest/curl
synced 2025-01-11 05:58:01 -05:00
http2: multi_connchanged() moved from multi.c, only used for h2
Closes #3557
This commit is contained in:
parent
4854b344e7
commit
61496154ce
16
lib/http2.c
16
lib/http2.c
@ -618,6 +618,18 @@ static int push_promise(struct Curl_easy *data,
|
|||||||
return rv;
|
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,
|
static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame,
|
||||||
void *userp)
|
void *userp)
|
||||||
{
|
{
|
||||||
@ -650,7 +662,7 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame,
|
|||||||
infof(conn->data,
|
infof(conn->data,
|
||||||
"Connection state changed (MAX_CONCURRENT_STREAMS == %u)!\n",
|
"Connection state changed (MAX_CONCURRENT_STREAMS == %u)!\n",
|
||||||
httpc->settings.max_concurrent_streams);
|
httpc->settings.max_concurrent_streams);
|
||||||
Curl_multi_connchanged(conn->data->multi);
|
multi_connchanged(conn->data->multi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -2163,7 +2175,7 @@ CURLcode Curl_http2_setup(struct connectdata *conn)
|
|||||||
conn->bundle->multiuse = BUNDLE_MULTIPLEX;
|
conn->bundle->multiuse = BUNDLE_MULTIPLEX;
|
||||||
|
|
||||||
infof(conn->data, "Connection state changed (HTTP/2 confirmed)\n");
|
infof(conn->data, "Connection state changed (HTTP/2 confirmed)\n");
|
||||||
Curl_multi_connchanged(conn->data->multi);
|
multi_connchanged(conn->data->multi);
|
||||||
|
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
11
lib/multi.c
11
lib/multi.c
@ -1155,17 +1155,6 @@ CURLMcode curl_multi_wait(struct Curl_multi *multi,
|
|||||||
{
|
{
|
||||||
return Curl_multi_wait(multi, extra_fds, extra_nfds, timeout_ms, ret, NULL);
|
return Curl_multi_wait(multi, extra_fds, extra_nfds, timeout_ms, ret, NULL);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* Curl_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.
|
|
||||||
*/
|
|
||||||
void Curl_multi_connchanged(struct Curl_multi *multi)
|
|
||||||
{
|
|
||||||
multi->recheckstate = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* multi_ischanged() is called
|
* multi_ischanged() is called
|
||||||
|
Loading…
Reference in New Issue
Block a user