Fix bugs, warnings

This commit is contained in:
Sofia 2026-08-09 21:42:17 +03:00
parent 92720a7156
commit e43a010704
3 changed files with 2 additions and 4 deletions

View File

@ -101,7 +101,7 @@ impl<T: std::fmt::Debug + Clone + Serialize + DeserializeOwned + Send + Sync + '
if let Some(_) = &self.udp.socket {
for (addr, conn) in &mut self.connections {
let interval = if conn.last_sent_ping > conn.last_recv_pong {
Duration::from_millis(2000)
self.config.max_ping_interval
} else {
self.config.ping_interval
};

View File

@ -16,7 +16,7 @@ use thiserror::*;
use crate::{
connections::{Connection, ConnectionError, ConnectionManager},
listener::{Listener, ListenerMessage},
package::{CloseReason, DelayedPackage, Package},
package::{CloseReason, DelayedPackage},
stats::NetStats,
};

View File

@ -1,10 +1,8 @@
use std::{
collections::VecDeque,
io::{self, Cursor},
marker::PhantomData,
net::{SocketAddr, UdpSocket},
sync::{Arc, mpsc::Sender},
time::{Duration, Instant},
};
use flate2::read::GzDecoder;