Merge "Make sure freeaddrinfo is always called on failure." am: f914029057
am: 9e1173aa40
Change-Id: Ib7936a9034467c38a58b5066472cdd5187a0e1b2
This commit is contained in:
commit
84cd98ceb0
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ int socket_network_client_timeout(const char* host, int port, int type, int time
|
|||
for (struct addrinfo* addr = addrs; addr != NULL; addr = addr->ai_next) {
|
||||
// The Mac doesn't have SOCK_NONBLOCK.
|
||||
int s = socket(addr->ai_family, type, addr->ai_protocol);
|
||||
if (s == -1 || toggle_O_NONBLOCK(s) == -1) return -1;
|
||||
if (s == -1 || toggle_O_NONBLOCK(s) == -1) break;
|
||||
|
||||
int rc = connect(s, addr->ai_addr, addr->ai_addrlen);
|
||||
if (rc == 0) {
|
||||
|
|
Loading…
Reference in a new issue