Fix Speedtest disconnects and Discord WebRTC

This commit is contained in:
ospab 2026-05-28 19:25:06 +03:00
parent 2ba9a3694d
commit 0334322aae
3 changed files with 4 additions and 4 deletions

View File

@ -180,8 +180,8 @@ where
R: tokio::io::AsyncRead + Unpin + Send + 'static,
W: tokio::io::AsyncWrite + Unpin + Send + 'static,
{
let (app_tx, mut tx_rx) = mpsc::channel::<Bytes>(1024);
let (rx_tx, app_rx) = mpsc::channel::<Bytes>(1024);
let (app_tx, mut tx_rx) = mpsc::channel::<Bytes>(16384);
let (rx_tx, app_rx) = mpsc::channel::<Bytes>(16384);
// TX Loop (App -> UoT -> Network): prefix each frame with u16 BE length
tokio::spawn(async move {

View File

@ -133,7 +133,7 @@ pub async fn handle_relay_message(
if debug {
let _ = ui_event_tx.send(UiEvent::Log(format!("Relay UDP ASSOCIATE stream_id={stream_id}")));
}
let server_udp = match UdpSocket::bind("0.0.0.0:0").await {
let server_udp = match UdpSocket::bind("[::]:0").await.or_else(|_| UdpSocket::bind("0.0.0.0:0").await) {
Ok(s) => std::sync::Arc::new(s),
Err(e) => {
let _ = ui_event_tx.send(UiEvent::Log(format!("UDP bind failed: {e}")));

View File

@ -116,7 +116,7 @@ where
info!("UoT client authenticated from {}", peer_addr);
// Register this connection in the map
let (tx, mut rx) = mpsc::channel::<Bytes>(1024);
let (tx, mut rx) = mpsc::channel::<Bytes>(16384);
{
tcp_map.write().await.insert(peer_addr, tx);
}