From: Daniel Stenberg Date: Sat, 28 Aug 2010 22:16:34 +0000 (+0200) Subject: multi: set timeouts when transfer begins X-Git-Tag: curl-7_21_2~119 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3af696f7c444a32cdd9e183a4ed0b543f09fef86;p=thirdparty%2Fcurl.git multi: set timeouts when transfer begins When a new transfer is about to start we now set the proper timeouts to expire for the multi interface if they are set for the handle. This is a follow-up bugfix to make sure that easy handles timeout properly when the times expire and the multi interface is used. This also improves curl_multi_timeout(). --- diff --git a/lib/transfer.c b/lib/transfer.c index 99a62610bd..71fb3961e1 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -1433,6 +1433,12 @@ CURLcode Curl_pretransfer(struct SessionHandle *data) Curl_initinfo(data); /* reset session-specific information "variables" */ Curl_pgrsStartNow(data); + if(data->set.timeout) + Curl_expire(data, data->set.timeout); + + if(data->set.connecttimeout) + Curl_expire(data, data->set.connecttimeout); + return CURLE_OK; }