diff --git a/TODO.md b/TODO.md index 1c022ca..d0fc9d7 100644 --- a/TODO.md +++ b/TODO.md @@ -9,6 +9,7 @@ * opening new connections in current form causes macOS issues, why? * try creating sockets with different ports (and also local ips if setting enabled), then converting them to mio tcp streams +* really break and remove connection when reading 0 bytes? * find out how to fully load opentracker * only half the number of requests are sent back as responses in opentracker and in aquatic when keep_alive is set to false, why? diff --git a/aquatic_http_load_test/src/network.rs b/aquatic_http_load_test/src/network.rs index 0e6b2a9..65e5335 100644 --- a/aquatic_http_load_test/src/network.rs +++ b/aquatic_http_load_test/src/network.rs @@ -53,6 +53,13 @@ impl Connection { ) -> bool { // bool = remove connection loop { match self.stream.read(&mut self.read_buffer[self.bytes_read..]){ + Ok(0) => { + if self.bytes_read == self.read_buffer.len(){ + eprintln!("read buffer is full"); + } + + break true; + } Ok(bytes_read) => { self.bytes_read += bytes_read;