1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00

remove unwrap in Hello packet handler

This commit is contained in:
mat 2025-04-04 18:37:31 -04:00
parent adf8a604c4
commit 7dcc86e266

View file

@ -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