put back the correct logic, as the change dated July 11th 2006 added bad
behaviour and a socket leak
This commit is contained in:
Родитель
4d4151f6c1
Коммит
e6ea8f1199
|
@ -5,7 +5,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
|
@ -244,7 +244,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
|
|||
|
||||
/* see if we have an IPv6 stack */
|
||||
s = socket(PF_INET6, SOCK_DGRAM, 0);
|
||||
if (s != CURL_SOCKET_BAD) {
|
||||
if (s == CURL_SOCKET_BAD) {
|
||||
/* Some non-IPv6 stacks have been found to make very slow name resolves
|
||||
* when PF_UNSPEC is used, so thus we switch to a mere PF_INET lookup if
|
||||
* the stack seems to be a non-ipv6 one. */
|
||||
|
|
Загрузка…
Ссылка в новой задаче