Fix bugs, warnings
This commit is contained in:
parent
92720a7156
commit
e43a010704
@ -101,7 +101,7 @@ impl<T: std::fmt::Debug + Clone + Serialize + DeserializeOwned + Send + Sync + '
|
|||||||
if let Some(_) = &self.udp.socket {
|
if let Some(_) = &self.udp.socket {
|
||||||
for (addr, conn) in &mut self.connections {
|
for (addr, conn) in &mut self.connections {
|
||||||
let interval = if conn.last_sent_ping > conn.last_recv_pong {
|
let interval = if conn.last_sent_ping > conn.last_recv_pong {
|
||||||
Duration::from_millis(2000)
|
self.config.max_ping_interval
|
||||||
} else {
|
} else {
|
||||||
self.config.ping_interval
|
self.config.ping_interval
|
||||||
};
|
};
|
||||||
|
|||||||
@ -16,7 +16,7 @@ use thiserror::*;
|
|||||||
use crate::{
|
use crate::{
|
||||||
connections::{Connection, ConnectionError, ConnectionManager},
|
connections::{Connection, ConnectionError, ConnectionManager},
|
||||||
listener::{Listener, ListenerMessage},
|
listener::{Listener, ListenerMessage},
|
||||||
package::{CloseReason, DelayedPackage, Package},
|
package::{CloseReason, DelayedPackage},
|
||||||
stats::NetStats,
|
stats::NetStats,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
use std::{
|
use std::{
|
||||||
collections::VecDeque,
|
|
||||||
io::{self, Cursor},
|
io::{self, Cursor},
|
||||||
marker::PhantomData,
|
marker::PhantomData,
|
||||||
net::{SocketAddr, UdpSocket},
|
net::{SocketAddr, UdpSocket},
|
||||||
sync::{Arc, mpsc::Sender},
|
sync::{Arc, mpsc::Sender},
|
||||||
time::{Duration, Instant},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use flate2::read::GzDecoder;
|
use flate2::read::GzDecoder;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user