aquatic_ws: keep valid_until up to date in established connections

This commit is contained in:
Joakim Frostegård 2020-08-01 04:27:31 +02:00
parent 0f072244ab
commit 6a9e1f5e72
2 changed files with 5 additions and 1 deletions

View file

@ -182,6 +182,11 @@ pub fn run_handshakes_and_read_messages(
){
loop {
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)
{
use ::tungstenite::Error::Io;