backpressure changes

This commit is contained in:
2026-03-20 17:47:34 +07:00
parent 49fe1e064f
commit 43a0b9daed
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ impl TcpConnection {
let stream_id = muxer.next_id(); let stream_id = muxer.next_id();
tokio::spawn(async move { tokio::spawn(async move {
let (v_tx, mut v_rx) = mpsc::channel(1024); let (v_tx, mut v_rx) = mpsc::channel(64);
muxer.register_stream(stream_id, v_tx).await; muxer.register_stream(stream_id, v_tx).await;
let connect_payload = target_addr.to_string(); let connect_payload = target_addr.to_string();
+1 -1
View File
@@ -23,7 +23,7 @@ pub struct UdpConnection {
const UDP_TIMEOUT: Duration = Duration::from_secs(60); const UDP_TIMEOUT: Duration = Duration::from_secs(60);
const CHANNEL_CAPACITY: usize = 1024; const CHANNEL_CAPACITY: usize = 64;
impl UdpConnection { impl UdpConnection {
pub fn new(handle: SocketHandle, target_addr: TargetAddress, muxer: Muxer) -> Self { pub fn new(handle: SocketHandle, target_addr: TargetAddress, muxer: Muxer) -> Self {