fix udp buffer size, avoid packet loss (#399)

also bump version to 2.0.2
This commit is contained in:
Sijie.Sun
2024-10-08 22:01:15 +08:00
committed by GitHub
parent 1be64223c8
commit 63821e56bc
7 changed files with 11 additions and 11 deletions

View File

@@ -296,8 +296,8 @@ impl UdpTunnelListenerData {
return;
}
let ring_for_send_udp = Arc::new(RingTunnel::new(64));
let ring_for_recv_udp = Arc::new(RingTunnel::new(64));
let ring_for_send_udp = Arc::new(RingTunnel::new(128));
let ring_for_recv_udp = Arc::new(RingTunnel::new(128));
tracing::debug!(
?ring_for_send_udp,
?ring_for_recv_udp,
@@ -559,8 +559,8 @@ impl UdpTunnelConnector {
dst_addr: SocketAddr,
conn_id: u32,
) -> Result<Box<dyn super::Tunnel>, super::TunnelError> {
let ring_for_send_udp = Arc::new(RingTunnel::new(32));
let ring_for_recv_udp = Arc::new(RingTunnel::new(32));
let ring_for_send_udp = Arc::new(RingTunnel::new(128));
let ring_for_recv_udp = Arc::new(RingTunnel::new(128));
tracing::debug!(
?ring_for_send_udp,
?ring_for_recv_udp,