mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
fix config::is_incoming_only
This commit is contained in:
@@ -33,7 +33,7 @@ use hbb_common::{
|
||||
anyhow::{anyhow, Context},
|
||||
bail,
|
||||
config::{
|
||||
Config, LocalConfig, PeerConfig, PeerInfoSerde, Resolution, CONNECT_TIMEOUT,
|
||||
self, Config, LocalConfig, PeerConfig, PeerInfoSerde, Resolution, CONNECT_TIMEOUT,
|
||||
PUBLIC_RS_PUB_KEY, READ_TIMEOUT, RELAY_PORT, RENDEZVOUS_PORT, RENDEZVOUS_SERVERS,
|
||||
},
|
||||
get_version_number, log,
|
||||
@@ -251,6 +251,9 @@ impl Client {
|
||||
conn_type: ConnType,
|
||||
interface: impl Interface,
|
||||
) -> ResultType<(Stream, bool, Option<Vec<u8>>)> {
|
||||
if config::is_incoming_only() {
|
||||
bail!("Incoming only mode");
|
||||
}
|
||||
// to-do: remember the port for each peer, so that we can retry easier
|
||||
if hbb_common::is_ip_str(peer) {
|
||||
return Ok((
|
||||
|
||||
Reference in New Issue
Block a user