mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-25 05:09:04 +08:00
cm, better position to start ipc
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
e1a0c62fd0
commit
7caafd563e
@ -217,7 +217,6 @@ void runMultiWindow(
|
||||
|
||||
void runConnectionManagerScreen(bool hide) async {
|
||||
await initEnv(kAppTypeConnectionManager);
|
||||
await bind.cmStartListenIpcThread();
|
||||
_runApp(
|
||||
'',
|
||||
const DesktopServerPage(),
|
||||
|
@ -234,6 +234,9 @@ class PlatformFFI {
|
||||
debugPrint(
|
||||
'_appType:$_appType,info1-id:$id,info2-name:$name,dir:$_dir');
|
||||
}
|
||||
if (desktopType == DesktopType.cm) {
|
||||
await _ffiBind.cmStartListenIpcThread();
|
||||
}
|
||||
await _ffiBind.mainDeviceId(id: id);
|
||||
await _ffiBind.mainDeviceName(name: name);
|
||||
await _ffiBind.mainSetHomeDir(home: _homeDir);
|
||||
|
@ -128,11 +128,14 @@ class ServerModel with ChangeNotifier {
|
||||
_connectStatus = status;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
if (desktopType == DesktopType.cm) {
|
||||
final res = await bind.cmCheckClientsLength(length: _clients.length);
|
||||
if (res != null) {
|
||||
debugPrint("clients not match!");
|
||||
updateClientState(res);
|
||||
}
|
||||
}
|
||||
|
||||
updatePasswordModel();
|
||||
}
|
||||
|
@ -2013,10 +2013,12 @@ async fn start_ipc(
|
||||
for _ in 0..10 {
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
{
|
||||
log::debug!("Start cm");
|
||||
res = crate::platform::run_as_user(args.clone());
|
||||
}
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
log::debug!("Start cm");
|
||||
res = crate::platform::run_as_user(args.clone(), None);
|
||||
}
|
||||
if res.is_ok() {
|
||||
@ -2032,6 +2034,7 @@ async fn start_ipc(
|
||||
run_done = false;
|
||||
}
|
||||
if !run_done {
|
||||
log::debug!("Start cm");
|
||||
super::CHILD_PROCESS
|
||||
.lock()
|
||||
.unwrap()
|
||||
|
Loading…
Reference in New Issue
Block a user