aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2023-03-01 21:02:33 +0000
committermat <github@matdoes.dev>2023-03-01 21:02:33 +0000
commit9b1b03d4ac59676393658f8558194490fe62a060 (patch)
tree18f31177bb16385797fd457a15fffea93c368520
parentcbc6af81fbdee71f4c1c7d62e1b91f8b17ad23bd (diff)
downloadazalea-drasl-9b1b03d4ac59676393658f8558194490fe62a060.tar.xz
fix reconnecting in testbot example
-rw-r--r--azalea/examples/testbot.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/azalea/examples/testbot.rs b/azalea/examples/testbot.rs
index 55c440a2..81e4148b 100644
--- a/azalea/examples/testbot.rs
+++ b/azalea/examples/testbot.rs
@@ -170,7 +170,9 @@ async fn swarm_handle(
SwarmEvent::Disconnect(account) => {
println!("bot got kicked! {}", account.username);
tokio::time::sleep(Duration::from_secs(5)).await;
- swarm.add(account, State::default()).await?;
+ swarm
+ .add_with_exponential_backoff(account, State::default())
+ .await?;
}
SwarmEvent::Chat(m) => {
println!("swarm chat message: {}", m.message().to_ansi());