mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-19 00:13:01 +08:00
bug fix
This commit is contained in:
parent
5631ffac4c
commit
5f61c2442a
@ -4,7 +4,7 @@ use crate::{
|
|||||||
udp::FramedSocket,
|
udp::FramedSocket,
|
||||||
ResultType,
|
ResultType,
|
||||||
};
|
};
|
||||||
use anyhow::{bail, Context};
|
use anyhow::bail;
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
use tokio::net::ToSocketAddrs;
|
use tokio::net::ToSocketAddrs;
|
||||||
use tokio_socks::{IntoTargetAddr, TargetAddr};
|
use tokio_socks::{IntoTargetAddr, TargetAddr};
|
||||||
@ -69,9 +69,7 @@ pub async fn connect_tcp<'t, T: IntoTargetAddr<'t>>(
|
|||||||
bail!("Invalid target addr");
|
bail!("Invalid target addr");
|
||||||
};
|
};
|
||||||
|
|
||||||
FramedStream::new(addrs[0], local, ms_timeout)
|
Ok(FramedStream::new(addrs[0], local, ms_timeout).await?)
|
||||||
.await
|
|
||||||
.with_context(|| "Failed to connect to rendezvous server")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ async fn test_nat_type_() -> ResultType<bool> {
|
|||||||
if port == 0 {
|
if port == 0 {
|
||||||
bail!("Invalid server address: {}", server1);
|
bail!("Invalid server address: {}", server1);
|
||||||
}
|
}
|
||||||
let server2 = format!("{}:{}", tmp[0], port);
|
let server2 = format!("{}:{}", tmp[0], port - 1);
|
||||||
let mut msg_out = RendezvousMessage::new();
|
let mut msg_out = RendezvousMessage::new();
|
||||||
let serial = Config::get_serial();
|
let serial = Config::get_serial();
|
||||||
msg_out.set_test_nat_request(TestNatRequest {
|
msg_out.set_test_nat_request(TestNatRequest {
|
||||||
|
Loading…
Reference in New Issue
Block a user