Skip to content

Commit 09a7a12

Browse files
committed
fix: text proxy updated for sample interface
1 parent 98f193b commit 09a7a12

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

twinleaf-tools/src/bin/tio-text-proxy.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ fn broadcast_to_client(mut stream: TcpStream, port: tio::proxy::Port) {
2323
println!("Connection from: {}", peer_addr);
2424

2525
loop {
26-
let sample = device.next();
26+
let sample = match device.next() {
27+
Ok(sample) => sample,
28+
Err(_) => {
29+
eprintln!("Failed to parse sample");
30+
break;
31+
}
32+
};
2733

2834
// Only process samples from stream ID 1
2935
if sample.stream.stream_id != 1 {

0 commit comments

Comments
 (0)