Source release 19.1.0

This commit is contained in:
Matt Feddersen
2024-03-28 19:21:54 -07:00
parent 28ec8548c6
commit b8bdfccebe
182 changed files with 10645 additions and 2040 deletions

View File

@@ -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;
}