Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do asynchronous DNS lookups in ServerAddr::socket_addrs #1191

Merged
merged 1 commit into from
Jan 6, 2024

Conversation

paolobarbolini
Copy link
Contributor

Turns out ServerAddr::socket_addrs was blocking the tokio runtime because it used the std blocking implementation for doing DNS lookups. This switches to the tokio implementation, which internally does a spawn_blocking of the std call.

Copy link
Member

@Jarema Jarema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Thank you for catching and fixing this @paolobarbolini !

@Jarema Jarema merged commit 8c783e0 into nats-io:main Jan 6, 2024
11 checks passed
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.

2 participants