curl-library
Re: [PATCH 2/7] pipelining: Fix connection handling under timeouts.
Date: Mon, 10 Nov 2014 21:14:33 +0100
On Mon, 10 Nov 2014 19:18:47 +0100
Carlo Wood <carlo_at_alinoe.com> wrote:
> I presume that *if* a request times out while already having reached
> state DONE then we shouldn't time it out no?
[...]
> So, if we reach the code where I changed the state to DONE after a
> timeout and the state is already CURLM_STATE_DONE then that state
> wasn't handled yet, only multistate(data, CURLM_STATE_DONE) was
> called, but nothing else.
>
> If the state was set to CURLM_STATE_COMPLETED then we can't reach this
> code, it is enclosed in a
>
> if(data->easy_conn &&
> (data->mstate >= CURLM_STATE_CONNECT) &&
> (data->mstate < CURLM_STATE_COMPLETED)) {
> ...
> if(timeout_ms < 0) {
> ...
> data->result = CURLE_OPERATION_TIMEDOUT;
> multistate(data, CURLM_STATE_DONE);
> }
> }
What about indeed not timing out when the state is already
set to CURLM_STATE_DONE?
If the above test is changed into .. < CURLM_STATE_DONE
then I think you get a more practical behavior.
-- Carlo Wood <carlo_at_alinoe.com> ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2014-11-10