Found the bug lol
This commit is contained in:
parent
aeb14be0b6
commit
71e412f3be
@ -16,6 +16,9 @@ async fn main() -> std::io::Result<()> {
|
||||
tokio::task::spawn(async move {
|
||||
let mut buffer = vec![0_u8; 2048];
|
||||
while let Ok(len) = rx_tcp.read(&mut buffer).await {
|
||||
if len == 0 {
|
||||
break;
|
||||
}
|
||||
let data = buffer[..len].to_vec();
|
||||
if tx_bus.send(data).is_err() {
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user