mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-04 00:33:12 +00:00
make main window can be reopen if killed by --server for creating ipc
This commit is contained in:
1 parent
1fcc7001bd
commit
5a740e891e
3 files changed
+17
-3
No files matched your search
@@ -197,6 +197,7 @@ lazy_static::lazy_static! {
|
||||
static ref IS_SERVER: bool = std::env::args().nth(1) == Some("--server".to_owned());
|
||||
// Is server logic running. The server code can invoked to run by the main process if --server is not running.
|
||||
static ref SERVER_RUNNING: Arc<RwLock<bool>> = Default::default();
|
||||
static ref IS_MAIN: bool = std::env::args().nth(1).map_or(true, |arg| !arg.starts_with("--"));
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
@@ -250,6 +251,11 @@ pub fn is_server() -> bool {
|
||||
*IS_SERVER
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_main() -> bool {
|
||||
*IS_MAIN
|
||||
}
|
||||
|
||||
// Is server logic running.
|
||||
#[inline]
|
||||
pub fn is_server_running() -> bool {
|
||||
|
||||
Reference in new issue
Block a user