Merge branch 'patch-2'

This commit is contained in:
Sebastian Thiel
2022-10-01 09:43:31 +08:00
3 changed files with 15 additions and 34 deletions

View File

@@ -24,10 +24,10 @@ use serde_json as json;
use std::io;
use std::fs;
use std::mem;
use std::thread::sleep;
use hyper::client::connect;
use tokio::io::{AsyncRead, AsyncWrite};
use tokio::time::sleep;
use tower_service;
use serde::{Serialize, Deserialize};

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;
}