Merge pull request #6333 from 21pages/cm

close all connections if cm exit unexpected, and allow retry
This commit is contained in:
RustDesk
2023-11-09 16:06:57 +08:00
committed by GitHub
6 changed files with 56 additions and 17 deletions

View File

@@ -236,6 +236,7 @@ pub enum Data {
FileTransferLog((String, String)),
#[cfg(windows)]
ControlledSessionCount(usize),
CmErr(String),
}
#[tokio::main(flavor = "current_thread")]
@@ -407,6 +408,12 @@ async fn handle(data: Data, stream: &mut Connection) {
} else {
None
};
} else if name == "hide_cm" {
value = if crate::hbbs_http::sync::is_pro() {
Some(hbb_common::password_security::hide_cm().to_string())
} else {
None
};
} else {
value = None;
}
@@ -698,7 +705,7 @@ where
}
#[tokio::main(flavor = "current_thread")]
async fn get_config(name: &str) -> ResultType<Option<String>> {
pub async fn get_config(name: &str) -> ResultType<Option<String>> {
get_config_async(name, 1_000).await
}