增加丢包日志

This commit is contained in:
lubeilin
2024-04-13 10:24:29 +08:00
parent c4a9e79dc2
commit e9ec6e8903
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -111,6 +111,7 @@ impl<Call: VntCallback> RecvDataHandler<Call> {
self.counter.add(buf.len() as _);
let net_packet = NetPacket::new(buf)?;
if net_packet.ttl() == 0 || net_packet.source_ttl() < net_packet.ttl() {
log::warn!("丢弃过时包:{:?}",net_packet.head());
return Ok(());
}
let current_device = self.current_device.load();
+1 -1
View File
@@ -366,7 +366,7 @@ impl<Call: VntCallback> ServerPacketHandler<Call> {
}
fn register(&self, current_device: &CurrentDeviceInfo, context: &Context) -> io::Result<()> {
if current_device.status.online() {
//已连接的不需要注册
log::info!("已连接的不需要注册,{:?}", self.config_info);
return Ok(());
}
let token = self.config_info.token.clone();