Skip to content

Commit

Permalink
do not clear buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
pd0wm committed Mar 28, 2024
1 parent ccc17c2 commit 9bb1caa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/can/async_can.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ fn process<T: CanAdapter>(

while shutdown_receiver.try_recv().is_err() {
let frames: Vec<Frame> = adapter.recv().unwrap();

for frame in frames {
if DEBUG {
debug! {"RX {:?}", frame};
Expand Down Expand Up @@ -57,7 +58,6 @@ fn process<T: CanAdapter>(
}

// 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;
Expand Down

0 comments on commit 9bb1caa

Please sign in to comment.