1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00

fix reconnecting in testbot example

This commit is contained in:
mat 2023-03-01 21:02:33 +00:00
parent cbc6af81fb
commit 9b1b03d4ac

View file

@ -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());