diff --git a/src/server.rs b/src/server.rs index c502f79bbd36..128fb6d1f930 100644 --- a/src/server.rs +++ b/src/server.rs @@ -77,7 +77,6 @@ lazy_static::lazy_static! { // Now we use this [`CLIENT_SERVER`] to do following operations: // - record local audio, and send to remote pub static ref CLIENT_SERVER: ServerPtr = new(); - static ref PRIMARY_VIDEO_SERVICE_LOCK: Arc> = Default::default(); } pub struct Server { @@ -260,8 +259,7 @@ impl Server { name.starts_with(video_service::NAME) } - pub fn try_add_privay_video_service(&mut self) { - let _lock = PRIMARY_VIDEO_SERVICE_LOCK.lock().unwrap(); + pub fn try_add_primay_video_service(&mut self) { let primary_video_service_name = video_service::get_service_name(*display_service::PRIMARY_DISPLAY_IDX); if !self.contains(&primary_video_service_name) { diff --git a/src/server/connection.rs b/src/server/connection.rs index e6d5af80d115..844d19150325 100644 --- a/src/server/connection.rs +++ b/src/server/connection.rs @@ -1244,7 +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.try_add_primay_video_service(); s.add_connection(self.inner.clone(), &noperms); } }