增加丢包日志
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user