Commit ae8f6620 authored by Antonio Larrosa's avatar Antonio Larrosa Committed by Daniel Stenberg
Browse files

connect: fix invalid "Network is unreachable" errors

Sometimes, in systems with both ipv4 and ipv6 addresses but where the
network doesn't support ipv6, Curl_is_connected returns an error
(intermittently) even if the ipv4 socket connects successfully.

This happens because there's a for-loop that iterates on the sockets but
the error variable is not resetted when the ipv4 is checked and is ok.

This patch fixes this problem by setting error to 0 when checking the
second socket and not having a result yet.

Fixes #794
parent befa21f2
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment