Fix. Do not get displays on server start.

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-11-17 17:11:25 +08:00
parent d3a33d786d
commit e09a050d41
3 changed files with 14 additions and 4 deletions

View File

@@ -1244,6 +1244,7 @@ impl Connection {
#[cfg(not(any(target_os = "android", target_os = "ios")))]
let _h = try_start_record_cursor_pos();
self.auto_disconnect_timer = Self::get_auto_disconenct_timer();
s.try_add_privay_video_service();
s.add_connection(self.inner.clone(), &noperms);
}
}

View File

@@ -24,7 +24,7 @@ lazy_static::lazy_static! {
static ref IS_CAPTURER_MAGNIFIER_SUPPORTED: bool = is_capturer_mag_supported();
static ref CHANGED_RESOLUTIONS: Arc<RwLock<HashMap<String, ChangedResolution>>> = Default::default();
// Initial primary display index.
// It should only be updated when the rustdesk server is started, and should not be updated when displays changed.
// It should should not be updated when displays changed.
pub static ref PRIMARY_DISPLAY_IDX: usize = get_primary();
static ref SYNC_DISPLAYS: Arc<Mutex<SyncDisplaysInfo>> = Default::default();
}