mirror of
https://github.com/kaesaecracker/servicepoint-simulator.git
synced 2025-01-18 10:30:14 +01:00
add warning for truncated packages
This commit is contained in:
parent
94868bbc73
commit
4f554bf60b
|
@ -30,6 +30,10 @@ pub fn start_udp_thread(bind: String, stop_receiver: Receiver<()>) -> JoinHandle
|
|||
other => other.unwrap(),
|
||||
};
|
||||
|
||||
if amount == buf.len(){
|
||||
warn!("the received package may have been truncated to a length of {}", amount);
|
||||
}
|
||||
|
||||
handle_package(&mut buf[..amount]);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue