add warning for truncated packages

This commit is contained in:
Vinzenz Schroeter 2024-05-09 14:55:19 +02:00
parent 94868bbc73
commit 4f554bf60b

View file

@ -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]);
}
});