mirror of
https://github.com/curl/curl.git
synced 2026-07-30 02:28:04 +03:00
Curl_socket_ready: make timeout a 'long'
It was mostly typecasted to int all over the code so switching to long instead all over should be a net gain.
This commit is contained in:
parent
fba00c9f7b
commit
4f170ee8f9
14 changed files with 26 additions and 28 deletions
|
|
@ -1282,9 +1282,9 @@ Transfer(struct connectdata *conn)
|
|||
struct SingleRequest *k = &data->req;
|
||||
bool done=FALSE;
|
||||
bool first=TRUE;
|
||||
int timeout_ms;
|
||||
long timeout_ms;
|
||||
int buffersize;
|
||||
int totmp;
|
||||
long totmp;
|
||||
|
||||
if((conn->sockfd == CURL_SOCKET_BAD) &&
|
||||
(conn->writesockfd == CURL_SOCKET_BAD))
|
||||
|
|
@ -1322,8 +1322,8 @@ Transfer(struct connectdata *conn)
|
|||
/* calculate upload rate-limitation timeout. */
|
||||
buffersize = (int)(data->set.buffer_size ?
|
||||
data->set.buffer_size : BUFSIZE);
|
||||
totmp = (int)Curl_sleep_time(data->set.max_send_speed,
|
||||
data->progress.ulspeed, buffersize);
|
||||
totmp = Curl_sleep_time(data->set.max_send_speed,
|
||||
data->progress.ulspeed, buffersize);
|
||||
if(totmp < timeout_ms)
|
||||
timeout_ms = totmp;
|
||||
}
|
||||
|
|
@ -1343,8 +1343,8 @@ Transfer(struct connectdata *conn)
|
|||
/* Calculate download rate-limitation timeout. */
|
||||
buffersize = (int)(data->set.buffer_size ?
|
||||
data->set.buffer_size : BUFSIZE);
|
||||
totmp = (int)Curl_sleep_time(data->set.max_recv_speed,
|
||||
data->progress.dlspeed, buffersize);
|
||||
totmp = Curl_sleep_time(data->set.max_recv_speed,
|
||||
data->progress.dlspeed, buffersize);
|
||||
if(totmp < timeout_ms)
|
||||
timeout_ms = totmp;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue