From 9bb1caafa7af7f9a89b7571c42f5178eeb1c7997 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Thu, 28 Mar 2024 08:18:25 +0100 Subject: [PATCH] do not clear buffer --- src/can/async_can.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/can/async_can.rs b/src/can/async_can.rs index 8f7b5e8..12472ab 100644 --- a/src/can/async_can.rs +++ b/src/can/async_can.rs @@ -28,6 +28,7 @@ fn process( while shutdown_receiver.try_recv().is_err() { let frames: Vec = adapter.recv().unwrap(); + for frame in frames { if DEBUG { debug! {"RX {:?}", frame}; @@ -57,7 +58,6 @@ fn process( } // TODO: use poll_recv_many? - buffer.clear(); while let Ok((frame, callback)) = tx_receiver.try_recv() { let mut loopback_frame = frame.clone(); loopback_frame.loopback = true;