aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-09-01 04:34:40 +0300
committermat <git@matdoes.dev>2025-09-01 04:34:40 +0300
commit995d8a68d2d2fbd07f5631d65f96b20bf48abdd4 (patch)
tree852fda4241ce765d53806caabd3c3bdec104c0a2
parent3aba53afad71369af95733143fff2fdc7f6a1fe8 (diff)
downloadazalea-drasl-995d8a68d2d2fbd07f5631d65f96b20bf48abdd4.tar.xz
fix panic when refreshing account token
-rw-r--r--azalea-client/src/plugins/login.rs19
1 files changed, 8 insertions, 11 deletions
diff --git a/azalea-client/src/plugins/login.rs b/azalea-client/src/plugins/login.rs
index 5cb2bce7..05e45cae 100644
--- a/azalea-client/src/plugins/login.rs
+++ b/azalea-client/src/plugins/login.rs
@@ -117,16 +117,13 @@ pub async fn auth_with_account(
// this is necessary since reqwest usually depends on tokio and we're using
// `futures` here
- async_compat::Compat::new(async {
- azalea_auth::sessionserver::join(
- &access_token,
- &packet.public_key,
- &private_key,
- uuid,
- &packet.server_id,
- )
- .await
- })
+ async_compat::Compat::new(azalea_auth::sessionserver::join(
+ &access_token,
+ &packet.public_key,
+ &private_key,
+ uuid,
+ &packet.server_id,
+ ))
.await
} {
if attempts >= 2 {
@@ -140,7 +137,7 @@ pub async fn auth_with_account(
) {
// uh oh, we got an invalid session and have
// to reauthenticate now
- account.refresh().await?;
+ async_compat::Compat::new(account.refresh()).await?;
} else {
return Err(err.into());
}