From 221b33197e2a084317e23c0d41fa6d4a6aab2e7b Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 9 Oct 2022 23:41:41 -0500 Subject: [PATCH] fix panic --- azalea-protocol/src/read.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs index 61d5d914..16820846 100644 --- a/azalea-protocol/src/read.rs +++ b/azalea-protocol/src/read.rs @@ -212,7 +212,7 @@ where // if we were given a cipher, decrypt the packet if let Some(message) = framed.next().await { - let mut bytes = message.unwrap(); + let mut bytes = message?; if let Some(cipher) = cipher { azalea_crypto::decrypt_packet(cipher, &mut bytes);