Bump version v7.9.1

This commit is contained in:
Σrebe - Romain GERARD 2023-11-02 09:26:31 +01:00
parent d8747443d6
commit 0a9cb00342
No known key found for this signature in database
GPG key ID: 7A42B4B97E0332F4
4 changed files with 22 additions and 21 deletions

View file

@ -6,6 +6,7 @@ use std::time::Duration;
use tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt, ReadHalf, WriteHalf};
use tokio::select;
use tokio::sync::oneshot;
use tokio::time::Instant;
use tracing::log::debug;
use tracing::{error, info, trace, warn};
@ -24,7 +25,10 @@ pub(super) async fn propagate_read(
// We do our own pin_mut! to avoid shadowing timeout and be able to reset it, on next loop iteration
// We reuse the future to avoid creating a timer in the tight loop
let timeout = tokio::time::interval_at(tokio::time::Instant::now() + ping_frequency, ping_frequency);
let start_at = Instant::now()
.checked_add(ping_frequency)
.unwrap_or(Instant::now() + Duration::from_secs(3600 * 24));
let timeout = tokio::time::interval_at(start_at, ping_frequency);
pin_mut!(timeout);
pin_mut!(local_rx);