rustdesk 2024-06-09 19:48:42 +08:00
parent 57570c3ba6
commit 78d7bfac01

View File

@ -77,6 +77,9 @@ async fn start_hbbs_sync_async() {
}
if !info_uploaded.0 && info_uploaded.2.map(|x| x.elapsed() >= UPLOAD_SYSINFO_TIMEOUT).unwrap_or(true) {
let mut v = crate::get_sysinfo();
// username is empty in login screen of windows, but here we only upload sysinfo once, causing
// real user name not uploaded after login screen. https://github.com/rustdesk/rustdesk/discussions/8031
if !cfg!(windows) || !v["username"].as_str().unwrap_or_default().is_empty() {
v["version"] = json!(crate::VERSION);
v["id"] = json!(id);
v["uuid"] = json!(crate::encode64(hbb_common::get_uuid()));
@ -105,6 +108,7 @@ async fn start_hbbs_sync_async() {
}
}
}
}
if conns.is_empty() && last_sent.map(|x| x.elapsed() < TIME_HEARTBEAT).unwrap_or(false) {
continue;
}