mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 10:45:30 +00:00
aquatic_ws: keep valid_until up to date in established connections
This commit is contained in:
parent
0f072244ab
commit
6a9e1f5e72
2 changed files with 5 additions and 1 deletions
1
TODO.md
1
TODO.md
|
|
@ -33,7 +33,6 @@
|
||||||
* tungstenite 0.11
|
* tungstenite 0.11
|
||||||
* is 'key' sent in announce request? if so, maybe handle it like in
|
* is 'key' sent in announce request? if so, maybe handle it like in
|
||||||
aquatic_http (including ip uniqueness part of peer map key)
|
aquatic_http (including ip uniqueness part of peer map key)
|
||||||
* established connections do not get valid_until updated, I think?
|
|
||||||
* tests
|
* tests
|
||||||
* use enum as return type for handshake machine
|
* use enum as return type for handshake machine
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -182,6 +182,11 @@ pub fn run_handshakes_and_read_messages(
|
||||||
){
|
){
|
||||||
loop {
|
loop {
|
||||||
if let Some(established_ws) = connections.get_mut(&poll_token)
|
if let Some(established_ws) = connections.get_mut(&poll_token)
|
||||||
|
.map(|c| { // Ugly but works
|
||||||
|
c.valid_until = valid_until;
|
||||||
|
|
||||||
|
c
|
||||||
|
})
|
||||||
.and_then(Connection::get_established_ws)
|
.and_then(Connection::get_established_ws)
|
||||||
{
|
{
|
||||||
use ::tungstenite::Error::Io;
|
use ::tungstenite::Error::Io;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue