From 82fad002404d109ab3de3a004c424e6ba828814c Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 5 Jan 2023 18:28:35 -0600 Subject: fix auto reauthentication THANKS MOJANG --- azalea-client/src/client.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'azalea-client/src') diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs index c88cfc31..f5e72839 100644 --- a/azalea-client/src/client.rs +++ b/azalea-client/src/client.rs @@ -310,7 +310,8 @@ impl Client { // both times, give up return Err(e.into()); } - if let SessionServerError::InvalidSession = e { + if matches!(e, SessionServerError::InvalidSession | ForbiddenOperation) + { // uh oh, we got an invalid session and have // to reauthenticate now account.refresh().await?; -- cgit v1.2.3