mirror of
https://github.com/OMGeeky/yup-oauth2.git
synced 2026-02-23 15:50:00 +01:00
Merge pull request #138 from maximebedard/bump-tokio-0-3
Bump to tokio 1.0 and hyper 0.14
This commit is contained in:
@@ -466,7 +466,7 @@ impl HyperClientBuilder for DefaultHyperClient {
|
||||
fn build_hyper_client(self) -> hyper::Client<Self::Connector> {
|
||||
hyper::Client::builder()
|
||||
.pool_max_idle_per_host(0)
|
||||
.build::<_, hyper::Body>(hyper_rustls::HttpsConnector::new())
|
||||
.build::<_, hyper::Body>(hyper_rustls::HttpsConnector::with_native_roots())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ impl DeviceFlow {
|
||||
let mut interval = device_auth_resp.interval;
|
||||
log::debug!("Polling every {:?} for device token", interval);
|
||||
loop {
|
||||
tokio::time::delay_for(interval).await;
|
||||
tokio::time::sleep(interval).await;
|
||||
interval = match Self::poll_token(
|
||||
&app_secret,
|
||||
hyper_client,
|
||||
|
||||
@@ -225,9 +225,9 @@ mod tests {
|
||||
.await
|
||||
.unwrap();
|
||||
let acc = ServiceAccountFlow::new(ServiceAccountFlowOpts { key, subject: None }).unwrap();
|
||||
let https = HttpsConnector::new();
|
||||
let https = HttpsConnector::with_native_roots();
|
||||
let client = hyper::Client::builder()
|
||||
.keep_alive(false)
|
||||
.pool_max_idle_per_host(0)
|
||||
.build::<_, hyper::Body>(https);
|
||||
println!(
|
||||
"{:?}",
|
||||
|
||||
Reference in New Issue
Block a user