diff --git a/vnt/src/handle/recv_data/server.rs b/vnt/src/handle/recv_data/server.rs index 58ea1ab..3a6c7fe 100644 --- a/vnt/src/handle/recv_data/server.rs +++ b/vnt/src/handle/recv_data/server.rs @@ -260,8 +260,11 @@ impl ServerPacketHandler { if old.virtual_ip != Ipv4Addr::UNSPECIFIED { log::info!("ip发生变化,old:{:?},response={:?}", old, response); } - if let Err(e) = self.device.set_ip(virtual_ip, virtual_netmask){ - self.callback.error(ErrorInfo::new_msg(ErrorType::Unknown,format!("set_ip {:?}",e))); + if let Err(e) = self.device.set_ip(virtual_ip, virtual_netmask) { + self.callback.error(ErrorInfo::new_msg( + ErrorType::Unknown, + format!("set_ip {:?}", e), + )); return Ok(()); } let mut guard = self.route_record.lock();