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:
parent
cbc6af81fb
commit
9b1b03d4ac
1 changed files with 3 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Reference in a new issue