From 679b112deeee1be9f773c6bd369bc1a975fe1628 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 28 Jan 2026 05:41:51 +0600 Subject: add Client::exit and Swarm::exit, and write related docs --- azalea/src/builder.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'azalea/src/builder.rs') diff --git a/azalea/src/builder.rs b/azalea/src/builder.rs index db51de63..0cb4abbf 100644 --- a/azalea/src/builder.rs +++ b/azalea/src/builder.rs @@ -150,7 +150,13 @@ where /// If this function isn't called, then our client will reconnect after /// [`DEFAULT_RECONNECT_DELAY`]. /// + /// Note that disabling auto-reconnecting will not make + /// [`ClientBuilder::start`] return on disconnect, because Azalea will keep + /// the internal swarm around forever until it's forcibly exited. To learn + /// how to do that, see [`Client::exit`]. + /// /// [`DEFAULT_RECONNECT_DELAY`]: crate::auto_reconnect::DEFAULT_RECONNECT_DELAY + /// [`Client::exit`]: crate::Client::exit #[must_use] pub fn reconnect_after(mut self, delay: impl Into>) -> Self { self.swarm.reconnect_after = delay.into(); -- cgit v1.2.3