Use tokio::time::sleep over std:🧵:sleep in api.rs as well

This commit is contained in:
philippeitis
2022-10-01 01:34:56 +00:00
committed by GitHub
parent 811ed3d016
commit 27891b8a10

View File

@@ -819,7 +819,7 @@ else {
match req_result {
Err(err) => {
if let client::Retry::After(d) = dlg.http_error(&err) {
sleep(d);
sleep(d).await;
continue;
}
${delegate_finish}(false);
@@ -835,7 +835,7 @@ else {
let server_response = json::from_str::<serde_json::Value>(&res_body_string).ok();
if let client::Retry::After(d) = dlg.http_failure(&restored_response, server_response.clone()) {
sleep(d);
sleep(d).await;
continue;
}