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<'_>,
|
args: Self::Args<'_>,
|
||||||
) -> binrw::BinResult<Self> {
|
) -> binrw::BinResult<Self> {
|
||||||
let tick1 = i32::read_options(reader, endian, args)?;
|
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 let Ok(count) = reader.read(&mut tick2_buf) {
|
||||||
if count == tick2_buf.len() {
|
if count == tick2_buf.len() {
|
||||||
return Ok(Self {
|
return Ok(Self {
|
||||||
|
@ -23,7 +23,7 @@ impl BinRead for Ping {
|
||||||
tick2: Some(i32::from_be_bytes(tick2_buf)),
|
tick2: Some(i32::from_be_bytes(tick2_buf)),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
tick1,
|
tick1,
|
||||||
tick2: None,
|
tick2: None,
|
||||||
|
|
Loading…
Add table
Reference in a new issue