An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Rust androidanydeskdartflatpakflutterflutter-appsioslinuxmacosp2prdpremote-controlremote-desktoprustrust-langteamviewervncwaylandwindows
Remove redundant mutex
fufesouf2f649319dbe
diff --git a/src/server.rs b/src/server.rsindex c502f79bb..128fb6d1f 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 remotepub static ref CLIENT_SERVER: ServerPtr = new();- static ref PRIMARY_VIDEO_SERVICE_LOCK: Arc<Mutex<()>> = 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.rsindex e6d5af80d..844d19150 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);}}