client: sleep 1s between connection attemps
This commit is contained in:
parent
f2e0f16350
commit
c6c7bbc51a
|
@ -1,6 +1,7 @@
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use futures::stream::TryStreamExt;
|
use futures::stream::TryStreamExt;
|
||||||
use mpart_async::server::MultipartParser;
|
use mpart_async::server::MultipartParser;
|
||||||
|
use tokio::time::{Duration, sleep};
|
||||||
use reqwest::StatusCode;
|
use reqwest::StatusCode;
|
||||||
use crate::app::App;
|
use crate::app::App;
|
||||||
|
|
||||||
|
@ -57,6 +58,6 @@ pub async fn run(app: App) {
|
||||||
run_once(&app).await
|
run_once(&app).await
|
||||||
.unwrap_or_else(|e| println!("Client: {:?}", e));
|
.unwrap_or_else(|e| println!("Client: {:?}", e));
|
||||||
|
|
||||||
// TODO: delay with backoff
|
sleep(Duration::from_secs(1)).await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user