From 67a8292b21a4da7e2ff6cb2b3cfafd05468705be Mon Sep 17 00:00:00 2001 From: Maxime Van Hees Date: Tue, 18 Apr 2023 16:25:19 +0000 Subject: [PATCH] fixed --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 322360e..70dfc3e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -143,8 +143,8 @@ async fn main() -> Result<(), Box> { let node_tun_clone = node_tun.clone(); let to_routing_clone = to_routing.clone(); tokio::spawn(async move { - let mut buf = BytesMut::zeroed(LINK_MTU); loop { + let mut buf = BytesMut::zeroed(LINK_MTU); match node_tun_clone.recv(&mut buf).await { Ok(n) => { buf.truncate(n);