Skip to content

isrecoverable check for DNSErrors seems ineffective and needing correction #1085

@tanmaykm

Description

@tanmaykm

There are some isrecoverable checks in the HTTP client retry layer here. The check that makes Sockets.DNSError due to EAI_AGAIN non-recoverable seems surprising, and is probably broken.

It checks the error code to match the declared const EAI_AGAIN = 2. However the codes can only be one of these, and the closest matching seems to be UV_EAI_AGAIN which has a value of -3001

julia> Base.UV_EAI_AGAIN
-3001

Which implies that the isrecoverable check for EAI_AGAIN DNS errors are in-effective now, and HTTP client considers all kinds of DNS errors recoverable. Unless there are any complains regarding this behavior, we could probably remove the specific EAI_AGAIN check then?

Or should HTTP client rather not be retrying on certain DNS errors? From the list of possible DNS errors actually only EAI_AGAIN seems recoverable. So should the check be corrected to check against UV_EAI_AGAIN and make that recoverable, and all others non-recoverable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions