lib/fetch: remove port from happy eyeballs verbose logs, wrong cast and redundant
This commit is contained in:
parent
88e72f9f00
commit
093950dba2
@ -564,10 +564,7 @@ happy_eyeballs_connect(struct addrinfo *res0, int verbose)
|
|||||||
char hbuf[1025];
|
char hbuf[1025];
|
||||||
if (getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, sizeof(hbuf), NULL,
|
if (getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, sizeof(hbuf), NULL,
|
||||||
0, NI_NUMERICHOST) == 0)
|
0, NI_NUMERICHOST) == 0)
|
||||||
fetch_info("connecting to %s:%d", hbuf,
|
fetch_info("connecting to %s", hbuf);
|
||||||
htons(res->ai_family == AF_INET
|
|
||||||
? ((struct sockaddr_in *)(res->ai_addr))->sin_port
|
|
||||||
: ((struct sockaddr_in6 *)(res->ai_addr))->sin6_port));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (connect(sd, res->ai_addr, res->ai_addrlen) == -1) {
|
if (connect(sd, res->ai_addr, res->ai_addrlen) == -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user