Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions async-nats/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -819,11 +819,19 @@ impl ConnectOptions {
self
}

/// By default, [`ConnectOptions::connect`] will return an error if
/// the connection to the server cannot be established.
///
/// Setting `retry_on_initial_connect` makes the client
/// establish the connection in the background.
pub fn retry_on_initial_connect(mut self) -> ConnectOptions {
self.retry_on_initial_connect = true;
self
}

/// By default, a server may advertise other servers in the cluster known to it.
/// By setting this option, the client will ignore the advertised servers.
/// This may be useful if the client may not be able to reach them.
pub fn ignore_discovered_servers(mut self) -> ConnectOptions {
self.ignore_discovered_servers = true;
self
Expand Down