Source release 19.1.0
This commit is contained in:
@@ -309,6 +309,7 @@ bool HttpSocket::Connect(int timeout_in_ms) {
|
||||
if (socket_fd_ < 0) {
|
||||
LOGE("Cannot open socket %s (port %s): errno = %d", domain_name_.c_str(),
|
||||
port_.c_str(), GetError());
|
||||
freeaddrinfo(addr_info);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -318,6 +319,7 @@ bool HttpSocket::Connect(int timeout_in_ms) {
|
||||
if (ioctlsocket(socket_fd_, FIONBIO, &mode) != 0) {
|
||||
LOGE("ioctlsocket error %s (port %s), wsa error = %d", domain_name_.c_str(),
|
||||
port_.c_str(), WSAGetLastError());
|
||||
freeaddrinfo(addr_info);
|
||||
CloseSocket();
|
||||
return false;
|
||||
}
|
||||
@@ -326,12 +328,14 @@ bool HttpSocket::Connect(int timeout_in_ms) {
|
||||
if (original_flags == -1) {
|
||||
LOGE("fcntl error %s (port %s), errno = %d", domain_name_.c_str(),
|
||||
port_.c_str(), errno);
|
||||
freeaddrinfo(addr_info);
|
||||
CloseSocket();
|
||||
return false;
|
||||
}
|
||||
if (fcntl(socket_fd_, F_SETFL, original_flags | O_NONBLOCK) == -1) {
|
||||
LOGE("fcntl error %s (port %s), errno = %d", domain_name_.c_str(),
|
||||
port_.c_str(), errno);
|
||||
freeaddrinfo(addr_info);
|
||||
CloseSocket();
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user