Why does iterating over a BufReader.lines() in a Server and Client doesn't end until I explicitly break the loop in the server
Advertisements I’m currently learning about the TcpStream and TcpListener so I’m trying to explore a little bit about it. I have encounter this problem, specificially, I have this code in server.rs let my_listener = TcpListener::bind("127.0.0.1:8000").unwrap(); for connection_stream in my_listener.incoming(){ println!("Got a connection"); let mut my_connection = connection_stream.unwrap(); let some_buffer = BufReader::new(&my_connection); let buffer_data = some_buffer.lines();… Read More Why does iterating over a BufReader.lines() in a Server and Client doesn't end until I explicitly break the loop in the server