mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
aquatic_http: debug log StreamEnded, keep connection on parse error
This commit is contained in:
parent
3d0de73873
commit
76a340574e
2 changed files with 14 additions and 5 deletions
1
TODO.md
1
TODO.md
|
|
@ -10,7 +10,6 @@
|
|||
* test tls
|
||||
* current serialized byte strings valid
|
||||
* scrape: does it work with multiple hashes?
|
||||
* StreamEnded isn't really an error and should really only be debug-logged
|
||||
* non-compact peers for ipv6 generally: use ResponsePeerList enum
|
||||
* on ipv6, compact=1 should result in error response
|
||||
* on ipv4, compact=0 should result in error response
|
||||
|
|
|
|||
|
|
@ -240,13 +240,23 @@ pub fn handle_connection_read_event(
|
|||
|
||||
break;
|
||||
},
|
||||
Err(err) => {
|
||||
info!("error reading request: {:?}", err);
|
||||
Err(RequestReadError::StreamEnded) => {
|
||||
::log::debug!("stream ended");
|
||||
|
||||
connections.remove(&poll_token);
|
||||
|
||||
break
|
||||
},
|
||||
Err(RequestReadError::Parse(err)) => {
|
||||
::log::info!("request httparse error: {}", err);
|
||||
|
||||
break
|
||||
},
|
||||
Err(RequestReadError::Io(err)) => {
|
||||
::log::info!("error reading request (io): {}", err);
|
||||
|
||||
connections.remove(&poll_token);
|
||||
|
||||
// Stop reading data. Later events don't matter since
|
||||
// connection was just removed.
|
||||
break;
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue