diff options
Diffstat (limited to 'azalea-auth/src/auth.rs')
| -rwxr-xr-x | azalea-auth/src/auth.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-auth/src/auth.rs b/azalea-auth/src/auth.rs index 55d7d36a..99dfc115 100755 --- a/azalea-auth/src/auth.rs +++ b/azalea-auth/src/auth.rs @@ -360,7 +360,7 @@ pub async fn get_ms_auth_token( tokio::time::sleep(std::time::Duration::from_secs(res.interval)).await; trace!("Polling to check if user has logged in..."); - if let Ok(access_token_response) = client + let res = client .post(format!( "https://login.live.com/oauth20_token.srf?client_id={client_id}" )) @@ -372,8 +372,8 @@ pub async fn get_ms_auth_token( .send() .await? .json::<AccessTokenResponse>() - .await - { + .await; + if let Ok(access_token_response) = res { trace!("access_token_response: {:?}", access_token_response); let expires_at = SystemTime::now() + std::time::Duration::from_secs(access_token_response.expires_in); |
