Skip to content

xmpp_stream_out: Fix getaddrinfo error handling - #118

Open
weiss wants to merge 1 commit into
processone:masterfrom
weiss:fix/getaddrinfo-error-handling
Open

weiss wants to merge 1 commit into
processone:masterfrom
weiss:fix/getaddrinfo-error-handling

Conversation

@weiss

@weiss weiss commented Oct 31, 2026

Copy link
Copy Markdown
Member

Since commit 3b6acfe, net:getaddrinfo/2 is used for hostname resolution. That function never returns nxdomain: unknown names are reported as enoname and temporary failures, such as DNS timeouts, as eagain. Therefore, timed out lookups were never detected, and error reasons differed from those of the gethostbyname path.

Map eagain to timeout and enoname to nxdomain. Don't retry failed lookups, as the resolver already retries according to its own configuration.

net:getaddrinfo/2 never returns 'nxdomain': unknown names are reported
as 'enoname' and temporary failures, such as DNS timeouts, as 'eagain'.
Therefore, timed out lookups were never detected, and error reasons
differed from those of the gethostbyname path.

Map 'eagain' to 'timeout' and 'enoname' to 'nxdomain'.  Don't retry
failed lookups, as the resolver already retries according to its own
configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant