connect: only log if all attempts failed (ipv4)
commit7203a2d1ca18b32feda71a48c21e80fb03f2e909
authorErik Faye-Lund <kusmabite@gmail.com>
Mon, 1 Aug 2011 11:16:10 +0000 (1 13:16 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Aug 2011 17:49:45 +0000 (1 10:49 -0700)
tree46c6a0668d9bd1ec5b8787d25c968b1a8b2a4427
parent9353e09afa21b24fa356f960300e1c0a1567aa72
connect: only log if all attempts failed (ipv4)

In 63a995b (Do not log unless all connect() attempts fail), a
mechanism to only log connection errors if all attempts failed
was introduced for the IPv6 code-path, but not for the IPv4 one.

Introduce a matching mechanism so IPv4-users also benefit from
this noise-reduction.

Move the call to socket after filling in sa, to make it more
apparent that errno can't change in between.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
connect.c