aboutsummaryrefslogtreecommitdiff
path: root/azalea-client
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-04-04 18:37:31 -0400
committermat <git@matdoes.dev>2025-04-05 06:37:36 +0800
commit7dcc86e266ade55799b3b56af9901e2a4279eb33 (patch)
tree8bcae64cc0de0bf29110f791eff3f2e208e69478 /azalea-client
parentadf8a604c400c19df8e28d6345abf2c0a8c32d05 (diff)
downloadazalea-drasl-7dcc86e266ade55799b3b56af9901e2a4279eb33.tar.xz
remove unwrap in Hello packet handler
Diffstat (limited to 'azalea-client')
-rw-r--r--azalea-client/src/client.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs
index bb3d52e7..e13368eb 100644
--- a/azalea-client/src/client.rs
+++ b/azalea-client/src/client.rs
@@ -425,7 +425,10 @@ impl Client {
match packet {
ClientboundLoginPacket::Hello(p) => {
debug!("Got encryption request");
- let e = azalea_crypto::encrypt(&p.public_key, &p.challenge).unwrap();
+ let Ok(e) = azalea_crypto::encrypt(&p.public_key, &p.challenge) else {
+ error!("Failed to encrypt the challenge from the server for {p:?}");
+ continue;
+ };
if let Some(access_token) = &account.access_token {
// keep track of the number of times we tried