aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-09-05 11:46:47 -0500
committermat <github@matdoes.dev>2022-09-05 11:46:47 -0500
commit453cbc83fd11d0e183dae1e0f1d8bb532b293c83 (patch)
tree1db99ffca5060bbdb2c395f2ba11432a5fd33d3b /azalea-protocol
parentfcb5bdf04241082d08b1ecc083745d6d97af61a9 (diff)
downloadazalea-drasl-453cbc83fd11d0e183dae1e0f1d8bb532b293c83.tar.xz
add a todo
Diffstat (limited to 'azalea-protocol')
-rwxr-xr-xazalea-protocol/src/read.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs
index 9ca102c1..aa99c4a7 100755
--- a/azalea-protocol/src/read.rs
+++ b/azalea-protocol/src/read.rs
@@ -61,6 +61,8 @@ where
// Packet Length
let length = read_varint_async(&mut stream).await? as u32;
+ // TODO: read individual tcp packets so we don't need this
+ // https://github.com/tokio-rs/tokio/blob/master/examples/print_each_packet.rs
let max_length: u32 = 2u32.pow(20u32); // 1mb, arbitrary
if length > max_length {
// minecraft *probably* won't send packets bigger than this