diff options
| author | mat <git@matdoes.dev> | 2025-04-04 18:37:31 -0400 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-04-05 06:37:36 +0800 |
| commit | 7dcc86e266ade55799b3b56af9901e2a4279eb33 (patch) | |
| tree | 8bcae64cc0de0bf29110f791eff3f2e208e69478 /azalea-client/src/client.rs | |
| parent | adf8a604c400c19df8e28d6345abf2c0a8c32d05 (diff) | |
| download | azalea-drasl-7dcc86e266ade55799b3b56af9901e2a4279eb33.tar.xz | |
remove unwrap in Hello packet handler
Diffstat (limited to 'azalea-client/src/client.rs')
| -rw-r--r-- | azalea-client/src/client.rs | 5 |
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 |
