fix, windows try kill flutter main window process only when --server's ipc is (#8086)

occupied

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2024-05-18 23:14:42 +08:00
committed by GitHub
parent 96f41fcc02
commit d3eaa6600d
3 changed files with 23 additions and 10 deletions

View File

@@ -356,8 +356,6 @@ async fn handle(data: Data, stream: &mut Connection) {
crate::server::input_service::fix_key_down_timeout_at_exit();
if is_server() {
let _ = privacy_mode::turn_off_privacy(0, Some(PrivacyModeState::OffByPeer));
#[cfg(all(windows, feature = "flutter"))]
crate::platform::kill_flutter_main_window();
}
std::process::exit(0);
}
@@ -972,6 +970,12 @@ pub async fn test_rendezvous_server() -> ResultType<()> {
Ok(())
}
#[tokio::main(flavor = "current_thread")]
pub async fn test_ipc_connection() -> ResultType<()> {
connect(1000, "").await?;
Ok(())
}
#[tokio::main(flavor = "current_thread")]
pub async fn send_url_scheme(url: String) -> ResultType<()> {
connect(1_000, "_url")