diff --git a/libs/hbb_common/src/platform/linux.rs b/libs/hbb_common/src/platform/linux.rs index 1d33c36be..89c96799d 100644 --- a/libs/hbb_common/src/platform/linux.rs +++ b/libs/hbb_common/src/platform/linux.rs @@ -124,24 +124,12 @@ fn line_values(indices: &[usize], line: &str) -> Vec { #[inline] pub fn get_values_of_seat0(indices: &[usize]) -> Vec { - _get_values_of_seat0_tries(indices, true, 20) + _get_values_of_seat0(indices, true) } #[inline] pub fn get_values_of_seat0_with_gdm_wayland(indices: &[usize]) -> Vec { - _get_values_of_seat0_tries(indices, false, 20) -} - -fn _get_values_of_seat0_tries(indices: &[usize], ignore_gdm_wayland: bool, attempts: usize) -> Vec { - for _ in 0..attempts{ - let value = _get_values_of_seat0(indices, ignore_gdm_wayland); - if value != line_values(indices, "") { - return value; - } - // Wait for 300ms and try again - std::thread::sleep(std::time::Duration::from_millis(300)); - } - line_values(indices, "") + _get_values_of_seat0(indices, false) } fn _get_values_of_seat0(indices: &[usize], ignore_gdm_wayland: bool) -> Vec {