Skip to content

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.

/// 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.

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
@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