client: sleep 1s between connection attemps

This commit is contained in:
Astro 2021-02-21 20:47:13 +01:00
parent f2e0f16350
commit c6c7bbc51a
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
use std::sync::Arc;
use futures::stream::TryStreamExt;
use mpart_async::server::MultipartParser;
use tokio::time::{Duration, sleep};
use reqwest::StatusCode;
use crate::app::App;
@ -57,6 +58,6 @@ pub async fn run(app: App) {
run_once(&app).await
.unwrap_or_else(|e| println!("Client: {:?}", e));
// TODO: delay with backoff
sleep(Duration::from_secs(1)).await;
}
}