macos, fix input crash

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-06-05 12:54:49 +08:00
parent 3459ec722b
commit 10176d9b2c
4 changed files with 18 additions and 7 deletions

View File

@@ -42,8 +42,6 @@ static PLUGIN_SOURCE_LOCAL_DIR: &str = "plugins";
pub use config::{ManagerConfig, PeerConfig, SharedConfig};
use crate::common::is_server;
/// Common plugin return.
///
/// [Note]
@@ -96,8 +94,12 @@ impl PluginReturn {
}
}
fn is_server_running() -> bool {
crate::common::is_server() || crate::common::is_server_running()
}
pub fn init() {
if !is_server() {
if !is_server_running() {
std::thread::spawn(move || manager::start_ipc());
} else {
if let Err(e) = remove_uninstalled() {