Remove redundant mutex
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
e09a050d41
commit
f2f649319d
@ -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<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) {
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user