mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-05-10 18:06:01 +02:00
fix build and update comment (#11542)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
parent
2cb096178a
commit
296aa7f8a0
1 changed files with 3 additions and 2 deletions
|
@ -115,15 +115,16 @@ async fn start_hbbs_sync_async() {
|
||||||
let old_hash = config::Status::get("sysinfo_hash");
|
let old_hash = config::Status::get("sysinfo_hash");
|
||||||
let ver = config::Status::get("sysinfo_ver"); // sysinfo_ver is the version of sysinfo on server's side
|
let ver = config::Status::get("sysinfo_ver"); // sysinfo_ver is the version of sysinfo on server's side
|
||||||
if hash == old_hash {
|
if hash == old_hash {
|
||||||
|
// When the api doesn't exist, Ok("") will be returned in test.
|
||||||
let samever = match crate::post_request(url.replace("heartbeat", "sysinfo_ver"), "".to_owned(), "").await {
|
let samever = match crate::post_request(url.replace("heartbeat", "sysinfo_ver"), "".to_owned(), "").await {
|
||||||
Ok(x) => {
|
Ok(x) => {
|
||||||
sysinfo_ver = x.clone();
|
sysinfo_ver = x.clone();
|
||||||
x == ver
|
|
||||||
*PRO.lock().unwrap() = true;
|
*PRO.lock().unwrap() = true;
|
||||||
|
x == ver
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
false // to make sure Pro can be assigned in below post for old
|
false // to make sure Pro can be assigned in below post for old
|
||||||
// hbbs pro not supporting sysinfo_ver
|
// hbbs pro not supporting sysinfo_ver, use false for ensuring
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if samever {
|
if samever {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue