Skip to content

Commit

Permalink
#768 refresh!
Browse files Browse the repository at this point in the history
  • Loading branch information
joepio committed Jan 10, 2024
1 parent 066e654 commit 54dd9c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/src/https.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,12 @@ pub async fn request_cert(config: &crate::config::Config) -> AtomicServerResult<
let mut delay = std::time::Duration::from_millis(250);
let url = authorizations.get(0).expect("Authorizations is empty");
let state = loop {
actix::clock::sleep(delay).await;
let state = order.state();
info!("Order state: {:#?}", state);
if let OrderStatus::Ready | OrderStatus::Invalid | OrderStatus::Valid = state.status {
break state;
}
order.refresh().await.unwrap();

delay *= 2;
tries += 1;
Expand All @@ -312,6 +312,7 @@ pub async fn request_cert(config: &crate::config::Config) -> AtomicServerResult<
.into());
}
}
actix::clock::sleep(delay).await;
};

if state.status == OrderStatus::Invalid {
Expand Down

0 comments on commit 54dd9c5

Please sign in to comment.