From 282cd92f2ceceb74e057e7a0b2b9824cb8341bc5 Mon Sep 17 00:00:00 2001 From: ParkGarden <60906654+zhourenke@users.noreply.github.com> Date: Mon, 17 Aug 2026 19:13:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(Windows):=20=E7=A7=BB=E9=99=A4=20wait=5Fint?= =?UTF-8?q?erface=5Fshow=20=E7=9A=84=2010=20=E7=A7=92=E7=A1=AC=E8=B6=85?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E9=81=BF=E5=85=8D=E5=BC=80=E6=9C=BA=E6=97=A0?= =?UTF-8?q?=E7=BD=91=E7=BB=9C=E6=97=B6=20TUN=20=E6=8E=A5=E5=8F=A3=E6=9C=AA?= =?UTF-8?q?=E5=B0=B1=E7=BB=AA=E5=AF=BC=E8=87=B4=E5=AE=9E=E4=BE=8B=E5=81=9C?= =?UTF-8?q?=E6=AD=A2=20(#2500)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- easytier/src/common/ifcfg/windows.rs | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/easytier/src/common/ifcfg/windows.rs b/easytier/src/common/ifcfg/windows.rs index db3ca512..15e4b23d 100644 --- a/easytier/src/common/ifcfg/windows.rs +++ b/easytier/src/common/ifcfg/windows.rs @@ -242,19 +242,13 @@ impl IfConfiguerTrait for WindowsIfConfiger { } async fn wait_interface_show(&self, name: &str) -> Result<(), Error> { - Ok( - tokio::time::timeout(std::time::Duration::from_secs(10), async move { - loop { - if let Some(idx) = Self::get_interface_index(name) { - tracing::info!(?name, ?idx, "Interface found"); - break; - } - tokio::time::sleep(std::time::Duration::from_millis(100)).await; - } - Ok::<(), Error>(()) - }) - .await??, - ) + loop { + if let Some(idx) = Self::get_interface_index(name) { + tracing::info!(?name, ?idx, "Interface found"); + return Ok(()); + } + tokio::time::sleep(std::time::Duration::from_millis(100)).await; + } } async fn set_mtu(&self, name: &str, mtu: u32) -> Result<(), Error> {