mirror of https://github.com/ospab/ostp.git
Fix Speedtest disconnects and Discord WebRTC
This commit is contained in:
parent
cbb0093dd5
commit
2ac66bec42
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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}")));
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue