Commit c48821ad authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

tcp_listener: change stream read > if ok but size is 0, continue to read again

parent ed177dfa
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment