Never try to read long pings packets because that's just another packet
This commit is contained in:
parent
50df2d2296
commit
fe94b27507
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ impl BinRead for Ping {
|
|||
args: Self::Args<'_>,
|
||||
) -> binrw::BinResult<Self> {
|
||||
let tick1 = i32::read_options(reader, endian, args)?;
|
||||
let mut tick2_buf = [0u8; 4];
|
||||
/*let mut tick2_buf = [0u8; 4];
|
||||
if let Ok(count) = reader.read(&mut tick2_buf) {
|
||||
if count == tick2_buf.len() {
|
||||
return Ok(Self {
|
||||
|
@ -23,7 +23,7 @@ impl BinRead for Ping {
|
|||
tick2: Some(i32::from_be_bytes(tick2_buf)),
|
||||
})
|
||||
}
|
||||
}
|
||||
}*/
|
||||
Ok(Self {
|
||||
tick1,
|
||||
tick2: None,
|
||||
|
|
Loading…
Add table
Reference in a new issue