cURL / Mailing Lists / curl-library / Single Mail


Tight loop in multi_runsingle state WAITPROXYCONNECT

From: Sean Boudreau <>
Date: Tue, 12 May 2015 14:57:06 -0400


I ran into a client that could repeatedly get into a tight loop in the
do { } while loop in multi_runsingle() while in state WAITPROXYCONNECT.
While in this state conn->bits.proxy and conn->bits.httpproxy were 0 but
conn->bits.bits.tunnel_proxy was set. conn->tunnel_state[FIRSTSOCKET]
was TUNNEL_INIT. I don't think simply checking tunnel_proxy as per the
attached suggested diff is sufficient as it's possible this gets set via
the CURLOPT_HTTPPROXYTUNNEL option while the others remain 0. If in
this state Curl_proxy_connect() doesn't make progress as it checks both
httpproxy and tunnel_proxy before doing anything.

Suggested diff attached that fixed the case I was seeing.


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

List admin:

  • text/plain attachment: diff
Received on 2015-05-12