From 71308ee0a3c2068bd135cd6731feae75710c58f2 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 15 Feb 2023 22:45:03 -0600 Subject: [PATCH] fix 0ns delay --- azalea/src/swarm/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azalea/src/swarm/mod.rs b/azalea/src/swarm/mod.rs index f46e1d29..9edaa305 100644 --- a/azalea/src/swarm/mod.rs +++ b/azalea/src/swarm/mod.rs @@ -509,7 +509,7 @@ impl Swarm { Ok(bot) => return bot, Err(e) => { disconnects += 1; - let delay = (Duration::from_secs(5) * 2u32.pow(disconnects)) + let delay = (Duration::from_secs(5) * 2u32.pow(disconnects.min(16))) .min(Duration::from_secs(15)); let username = account.username.clone(); error!("Error joining as {username}: {e}. Waiting {delay:?} and trying again.");