curl-library
Re: CURLOPT_TIMEOUT not working sometimes: easy handle goes silent
Date: Sun, 27 Jan 2019 23:49:45 +0100 (CET)
On Thu, 24 Jan 2019, Zhao Yisha via curl-library wrote:
> I did some investigations and think there is discrepancy between expire time
> and Curl_timeleft calculation. EXPIRE_TIMEOUT/EXPIRE_CONNECTTIMEOUT timeouts
> are smaller than (t_startsingle/t_startop + configured timeout). My proposed
> fix is to set corresponding expire time after t_startsingle and t_startop
> are set.
>
> Have you seen a similar problem?
I have not seen this happen, but I do appreciate your analysis and I
understand what you're saying happens in your case: The EXPIRE_* timeout
triggers but Curl_timeleft() doesn't think there's a timeout yet so it doesn't
cancel the transfer, but since the expire timeout already triggered there is
no more timer in the timetree.
Attach is my attempt at fixing this based on your suggestion and description.
Is this what you had in mind?
I also created PR #3501 where this patch is being run through the CI tests:
https://github.com/curl/curl/pull/3501
-- / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
- text/x-diff attachment: 0001-multi-set-the-EXPIRE_-TIMEOUT-timers-at-TIMER_STARTS.patch