diff options
Diffstat (limited to 'azalea-protocol/src/write.rs')
| -rwxr-xr-x | azalea-protocol/src/write.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/azalea-protocol/src/write.rs b/azalea-protocol/src/write.rs index 38ef174c..345829c5 100755 --- a/azalea-protocol/src/write.rs +++ b/azalea-protocol/src/write.rs @@ -65,10 +65,10 @@ pub async fn write_packet<P, W>( if let Some(threshold) = compression_threshold { buf = compression_encoder(&buf, threshold).await.unwrap(); } + buf = frame_prepender(&mut buf).unwrap(); // if we were given a cipher, encrypt the packet if let Some(cipher) = cipher { azalea_crypto::encrypt_packet(cipher, &mut buf); } - buf = frame_prepender(&mut buf).unwrap(); stream.write_all(&buf).await.unwrap(); } |
