From 7a3b92bbd9937de24793d758b108e59fe31a0d1c Mon Sep 17 00:00:00 2001 From: kgokalp Date: Thu, 28 Aug 2025 18:08:32 +0300 Subject: [PATCH] Fix: handle EAI_ALLDONE from gai_suspend in getaddrinfo_with_timeout (#2228) --- httplib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index 371db9a..c035984 100644 --- a/httplib.h +++ b/httplib.h @@ -3776,7 +3776,7 @@ inline int getaddrinfo_with_timeout(const char *node, const char *service, int wait_result = gai_suspend((const struct gaicb *const *)requests, 1, &timeout); - if (wait_result == 0) { + if (wait_result == 0 || wait_result == EAI_ALLDONE) { // Completed successfully, get the result int gai_result = gai_error(&request); if (gai_result == 0) {