Skip to content

Commit

Permalink
Fix typo in doc for ping_interval
Browse files Browse the repository at this point in the history
Issue: ping_interval example was using flush_interval
Also, Use duration::from_secs
  • Loading branch information
sravan-s committed Aug 31, 2023
1 parent 76e2a02 commit 8661572
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion async-nats/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ impl ConnectOptions {
/// # #[tokio::main]
/// # async fn main() -> Result<(), async_nats::ConnectError> {
/// async_nats::ConnectOptions::new()
/// .flush_interval(Duration::from_millis(100))
/// .ping_interval(Duration::from_secs(24))
/// .connect("demo.nats.io")
/// .await?;
/// # Ok(())
Expand Down

0 comments on commit 8661572

Please sign in to comment.