Skip to content

Commit 7a3b92b

Browse files
authored
Fix: handle EAI_ALLDONE from gai_suspend in getaddrinfo_with_timeout (#2228)
1 parent eb11032 commit 7a3b92b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

httplib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3776,7 +3776,7 @@ inline int getaddrinfo_with_timeout(const char *node, const char *service,
37763776
int wait_result =
37773777
gai_suspend((const struct gaicb *const *)requests, 1, &timeout);
37783778

3779-
if (wait_result == 0) {
3779+
if (wait_result == 0 || wait_result == EAI_ALLDONE) {
37803780
// Completed successfully, get the result
37813781
int gai_result = gai_error(&request);
37823782
if (gai_result == 0) {

0 commit comments

Comments
 (0)