mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-06 08:40:12 +00:00
stupid workaround for https://sciter.com/forums/topic/crash-on-latest-tis-mac-sdk-sometimes/
This commit is contained in:
1 parent
3ec69b6d97
commit
809c220eaf
4 files changed
+22
-6
No files matched your search
@@ -22,6 +22,11 @@ use std::{
|
||||
|
||||
pub type Childs = Arc<Mutex<(bool, HashMap<(String, String), Child>)>>;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
// stupid workaround for https://sciter.com/forums/topic/crash-on-latest-tis-mac-sdk-sometimes/
|
||||
static ref STUPID_VALUES: Mutex<Vec<Arc<Vec<Value>>>> = Default::default();
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
struct UI(
|
||||
Childs,
|
||||
@@ -811,3 +816,10 @@ fn check_connect_status(
|
||||
std::thread::spawn(move || check_connect_status_(reconnect, cloned, cloned_options));
|
||||
(status, options)
|
||||
}
|
||||
|
||||
// sacrifice some memory
|
||||
pub fn value_crash_workaround(values: &[Value]) -> Arc<Vec<Value>> {
|
||||
let persist = Arc::new(values.to_vec());
|
||||
STUPID_VALUES.lock().unwrap().push(persist.clone());
|
||||
persist
|
||||
}
|
||||
Reference in new issue
Block a user