Skip to content

Commit acecf46

Browse files
Ignore TCP recv if failed (#1519)
1 parent b3e82ad commit acecf46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libafl/src/events/tcp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ where
171171
spawn(async move {
172172
// In a loop, read data from the socket and write the data back.
173173
loop {
174-
let buf: Vec<u8> = rx_inner.recv().await.expect("Could not receive");
174+
let buf: Vec<u8> = rx_inner.recv().await.unwrap_or(vec![]);
175175

176176
#[cfg(feature = "tcp_debug")]
177177
println!("{buf:?}");

0 commit comments

Comments
 (0)