HTTPClient: On Windows, we have to permit connect to "fail" with an errno of 0. Wacky.

This commit is contained in:
Henrik Rydgård
2023-09-17 22:40:29 +02:00
parent 92d1a66565
commit 388a34cdf1
+1 -1
View File
@@ -131,7 +131,7 @@ bool Connection::Connect(int maxTries, double timeout, bool *cancelConnect) {
// Start trying to connect (async with timeout.)
errno = 0;
if (connect(sock, possible->ai_addr, (int)possible->ai_addrlen) < 0) {
if (errno != EINPROGRESS) {
if (errno != 0 && errno != EINPROGRESS) {
char addrStr[128];
FormatAddr(addrStr, sizeof(addrStr), possible);
if (errno != ENETUNREACH) {