This commit is contained in:
rustdesk 2023-07-20 10:40:26 +08:00
parent e48f36a227
commit 2ec773e9bf

View File

@ -504,7 +504,8 @@ async fn direct_server(server: ServerPtr) {
let mut listener = None;
let mut port = 0;
loop {
let disabled = Config::get_option("direct-server").is_empty();
let disabled = Config::get_option("direct-server").is_empty()
|| !Config::get_option("stop-service").is_empty();
if !disabled && listener.is_none() {
port = get_direct_port();
match hbb_common::tcp::listen_any(port as _).await {