mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
Fix writing encrypted packets
This commit is contained in:
parent
766b290065
commit
0ccf203460
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue