Skip to content

getaddrinfo_with_timeout function incorrectly treats EAI_ALLDONE (-103) from gai_suspend as an error #2225

@kgokalp

Description

@kgokalp

In the getaddrinfo_with_timeout function, gai_suspend may return EAI_ALLDONE (-103) in some cases. According to the glibc manual, EAI_ALLDONE indicates that all requests are already complete. This is not an error condition, it simply means there is nothing left to wait for, and the caller should check request results using gai_error(). Currently, the code treats EAI_ALLDONE as an error and returns a connection error. This causes valid DNS resolutions to fail in cases where the requests finish before the timeout elapses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions