mirror of
https://github.com/curl/curl.git
synced 2026-07-31 11:58:05 +03:00
- Using the libssh2 0.19 function libssh2_session_block_directions(), libcurl
now has an improved ability to do right when the multi interface (both "regular" and multi_socket) is used for SCP and SFTP transfers. This should result in (much) less busy-loop situations and thus less CPU usage with no speed loss.
This commit is contained in:
parent
000a13e21a
commit
07416b61e3
14 changed files with 158 additions and 22 deletions
10
lib/multi.c
10
lib/multi.c
|
|
@ -786,11 +786,8 @@ static int multi_getsock(struct Curl_one_easy *easy,
|
|||
happen when this is called from curl_multi_remove_handle() =>
|
||||
singlesocket() => multi_getsock().
|
||||
*/
|
||||
|
||||
if(easy->easy_handle->state.pipe_broke ||
|
||||
!easy->easy_conn) {
|
||||
if(easy->easy_handle->state.pipe_broke || !easy->easy_conn)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(easy->state > CURLM_STATE_CONNECT &&
|
||||
easy->state < CURLM_STATE_COMPLETED) {
|
||||
|
|
@ -2108,7 +2105,10 @@ static bool isHandleAtHead(struct SessionHandle *handle,
|
|||
}
|
||||
|
||||
/* given a number of milliseconds from now to use to set the 'act before
|
||||
this'-time for the transfer, to be extracted by curl_multi_timeout() */
|
||||
this'-time for the transfer, to be extracted by curl_multi_timeout()
|
||||
|
||||
Pass zero to clear the timeout value for this handle.
|
||||
*/
|
||||
void Curl_expire(struct SessionHandle *data, long milli)
|
||||
{
|
||||
struct Curl_multi *multi = data->multi;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue