Skip to content

Commit

Permalink
Add client.flush() calls to example code in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
HeCorr authored May 20, 2024
1 parent 66e8f99 commit 0088b85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions async-nats/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@
//! for _ in 0..10 {
//! client.publish(subject, data.clone()).await?;
//! }
//!
//! // Flush internal buffer before exiting to make sure all messages are sent
//! client.flush().await?;
//!
//! # Ok(())
//! # }
//! ```
Expand Down

0 comments on commit 0088b85

Please sign in to comment.