Skip to content

Commit

Permalink
tcp_listener: change stream read > if ok but size is 0, continue to r…
Browse files Browse the repository at this point in the history
…ead again
  • Loading branch information
Arikato111 committed Jun 3, 2024
1 parent ed177df commit c48821a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/openflow/tcp_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ pub fn tcp_listener_handler<OME: OfpMsgEvent>(address: &str) {
Ok(v) if v > 0 => {
ctrl.request_handler(&mut buffer, &mut stream);
}
Ok(_) | Err(_) => {
Ok(_) => {
continue;
}
Err(_) => {
println!("cannot read packet");
break;
}
Expand Down

0 comments on commit c48821a

Please sign in to comment.