diff options
| author | mat <github@matdoes.dev> | 2022-05-01 14:11:11 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-05-01 14:11:11 -0500 |
| commit | 0ccf203460007f4472e9018f8cefbd95d1ee1ce6 (patch) | |
| tree | 6063bd3d3d17fca0429fabc84526c5d3c724eb6a /azalea-protocol | |
| parent | 766b29006511e22eee8d6aae199c40203e5dcb0c (diff) | |
| download | azalea-drasl-0ccf203460007f4472e9018f8cefbd95d1ee1ce6.tar.xz | |
Fix writing encrypted packets
Diffstat (limited to 'azalea-protocol')
| -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(); } |
