mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 02:05:30 +00:00
aquatic_http: update 'valid_until' for established connections
This commit is contained in:
parent
1dc2f44d9c
commit
3a8e5a3abf
2 changed files with 10 additions and 4 deletions
3
TODO.md
3
TODO.md
|
|
@ -15,12 +15,11 @@
|
||||||
* scrape info hash parsing: multiple ought to be accepted
|
* scrape info hash parsing: multiple ought to be accepted
|
||||||
* info hashes, peer ids: check that whole deserialization and url decoding
|
* info hashes, peer ids: check that whole deserialization and url decoding
|
||||||
works as it should. There are suspicously many `\u{fffd}`
|
works as it should. There are suspicously many `\u{fffd}`
|
||||||
* established connections do not get valid_until updated, I think? Might
|
|
||||||
be the case in aquatic_ws too.
|
|
||||||
* move stuff to common crate with ws: what about Request/InMessage etc?
|
* move stuff to common crate with ws: what about Request/InMessage etc?
|
||||||
* don't overdo this
|
* don't overdo this
|
||||||
|
|
||||||
## aquatic_ws
|
## aquatic_ws
|
||||||
|
* established connections do not get valid_until updated, I think?
|
||||||
* tests
|
* tests
|
||||||
* ipv4 and ipv6 state split: think about this more..
|
* ipv4 and ipv6 state split: think about this more..
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -171,8 +171,15 @@ pub fn run_handshakes_and_read_requests(
|
||||||
valid_until: ValidUntil,
|
valid_until: ValidUntil,
|
||||||
){
|
){
|
||||||
loop {
|
loop {
|
||||||
let opt_established = connections.get_mut(&poll_token)
|
let opt_connection = connections.get_mut(&poll_token);
|
||||||
.and_then(|c| c.inner.as_mut().left());
|
|
||||||
|
let opt_established = if let Some(connection) = opt_connection {
|
||||||
|
connection.valid_until = valid_until;
|
||||||
|
|
||||||
|
connection.inner.as_mut().left()
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
};
|
||||||
|
|
||||||
if let Some(established) = opt_established {
|
if let Some(established) = opt_established {
|
||||||
match established.read_request(){
|
match established.read_request(){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue