Ignore TCP recv if failed (#1519)
This commit is contained in:
parent
b3e82ad36e
commit
acecf46fb9
@ -171,7 +171,7 @@ where
|
|||||||
spawn(async move {
|
spawn(async move {
|
||||||
// In a loop, read data from the socket and write the data back.
|
// In a loop, read data from the socket and write the data back.
|
||||||
loop {
|
loop {
|
||||||
let buf: Vec<u8> = rx_inner.recv().await.expect("Could not receive");
|
let buf: Vec<u8> = rx_inner.recv().await.unwrap_or(vec![]);
|
||||||
|
|
||||||
#[cfg(feature = "tcp_debug")]
|
#[cfg(feature = "tcp_debug")]
|
||||||
println!("{buf:?}");
|
println!("{buf:?}");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user