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