mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
aquatic http load test: remove connection if read 0 bytes
This commit is contained in:
parent
8d58f8bb70
commit
d36f97f272
2 changed files with 8 additions and 0 deletions
1
TODO.md
1
TODO.md
|
|
@ -9,6 +9,7 @@
|
||||||
* opening new connections in current form causes macOS issues, why?
|
* opening new connections in current form causes macOS issues, why?
|
||||||
* try creating sockets with different ports (and also local ips if setting
|
* try creating sockets with different ports (and also local ips if setting
|
||||||
enabled), then converting them to mio tcp streams
|
enabled), then converting them to mio tcp streams
|
||||||
|
* really break and remove connection when reading 0 bytes?
|
||||||
* find out how to fully load opentracker
|
* find out how to fully load opentracker
|
||||||
* only half the number of requests are sent back as responses in 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?
|
and in aquatic when keep_alive is set to false, why?
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,13 @@ impl Connection {
|
||||||
) -> bool { // bool = remove connection
|
) -> bool { // bool = remove connection
|
||||||
loop {
|
loop {
|
||||||
match self.stream.read(&mut self.read_buffer[self.bytes_read..]){
|
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) => {
|
Ok(bytes_read) => {
|
||||||
self.bytes_read += bytes_read;
|
self.bytes_read += bytes_read;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue