Re: Infinite loop when calling curl_multi_cleanup
Date: Fri, 21 Oct 2016 11:13:04 +0200 (CEST)
On Thu, 20 Oct 2016, Valentin David wrote:
>> How did you end up in this situation, is it reproducible? Are you using
>> Pipelining or HTTP/2 multiplexing?
> No HTTP/2. But maybe some pipelining. Howerver I do not think it is used
> when this happens. recv_pipe size is 1. I think the way it happens is there
> is a request sent, but no answer received yet. We remove the easy from the
> multi. Then we close the multi. But there might not have been any
> curl_multi_socket_action called between.
I propose this change (see attachment) that "forces" the connections to get
marked for closure before tryign to do disconnect them, which should fix the
problems we've now got reported three times.
It isn't really a fix to avoid us ending up in this situation but more how to
handle it when we do, which is lame but hopefully at least a step toward
fixing hanging problems for people.
Unless someone objects, I will merge this within a few days.
-- / daniel.haxx.se
- text/x-diff attachment: 0001-multi-force-connections-to-get-closed-in-close_all_c.patch