--retry: Retry transfers on timeout and DNS errors

This commit is contained in:
Dan Fandrich 2011-12-21 11:09:09 -08:00
parent 430527a1d7
commit 2cf9e78a22
1 changed files with 4 additions and 1 deletions

View File

@ -1233,7 +1233,10 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
RETRY_LAST /* not used */
} retry = RETRY_NO;
long response;
if(CURLE_OPERATION_TIMEDOUT == res)
if((CURLE_OPERATION_TIMEDOUT == res) ||
(CURLE_COULDNT_RESOLVE_HOST == res) ||
(CURLE_COULDNT_RESOLVE_PROXY == res) ||
(CURLE_FTP_ACCEPT_TIMEOUT == res))
/* retry timeout always */
retry = RETRY_TIMEOUT;
else if((CURLE_OK == res) ||