mirror of
https://github.com/curl/curl.git
synced 2026-08-24 20:43:47 +03:00
FTP: perform active connections non-blocking
1- Two new error codes are introduced. CURLE_FTP_ACCEPT_FAILED to be set whenever ACCEPTing fails because of FTP server connected. CURLE_FTP_ACCEPT_TIMEOUT to be set whenever ACCEPTing timeouts. Neither of these errors are considered fatal and control connection remains OK because it could just be a firewall blocking server to connect to the client. 2- One new setopt option was introduced. CURLOPT_ACCEPTTIMEOUT_MS It sets the maximum amount of time FTP client is going to wait for a server to connect. Internal default accept timeout is 60 seconds.
This commit is contained in:
parent
5527417afa
commit
c834213ad5
20 changed files with 366 additions and 132 deletions
|
|
@ -169,6 +169,10 @@ void Curl_pgrsTime(struct SessionHandle *data, timerid timer)
|
|||
data->progress.t_startsingle = now;
|
||||
break;
|
||||
|
||||
case TIMER_STARTACCEPT:
|
||||
data->progress.t_acceptdata = Curl_tvnow();
|
||||
break;
|
||||
|
||||
case TIMER_NAMELOOKUP:
|
||||
data->progress.t_nslookup =
|
||||
Curl_tvdiff_secs(now, data->progress.t_startsingle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue