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

fix #1180: Add missing docs for ConnectOptions #1181

Merged
merged 2 commits into from
Jan 2, 2024
Merged

fix #1180: Add missing docs for ConnectOptions #1181

merged 2 commits into from
Jan 2, 2024

Conversation

barafael
Copy link
Contributor

Docs for ConnectOptions::retry_on_initial_connect and ConnectOptions::ignore_discovered_servers.

@barafael barafael changed the title Fix #1180: Add missing docs for ConnectOptions fix #1180: Add missing docs for ConnectOptions Dec 27, 2023
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.

Thank you for your PR!

Some review notes.

async-nats/src/options.rs Outdated Show resolved Hide resolved
/// By default, client construction will fail if
/// the connection to the server cannot be established.
///
/// Setting `retry_on_initial_connect` causes client construction
Copy link
Member

Choose a reason for hiding this comment

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

It's not exactly how it works. In this case, the handle to the Client is returned immediately and conection is handled asynchronously in the background. Otherwise users would not know the reason for initial connection failure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure I understand - if you don't mind, have a look again.

async-nats/src/options.rs Outdated Show resolved Hide resolved
ConnectOptions::retry_on_initial_connect and ConnectOptions::ignore_discovered_servers
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 your contribution!

@Jarema Jarema merged commit 7a4201a into nats-io:main Jan 2, 2024
11 checks passed
@barafael barafael deleted the retry-on-initial-connect-docs branch January 2, 2024 12:16
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