mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-12-05 14:10:18 +08:00
refactor: mihomo ipc (#7601)
* refactor: mihomo ipc request * refactor: remove redundant write locks and await on mihomo handle * fix(rule): handle non-string types in ProviderButton labels * refactor: handle non-string value types in RuleItem component * refactor(tauri): remove unnecessary await in get_base_config call * chore: update tauri-plugin-mihomo deps * refactor: rename ConnectionId to WsConnectionId * chore: update tauri-plugin-mihomo-api dependency reference * chore(config): use Proxy::default in profile test initialization
This commit is contained in:
@@ -185,7 +185,7 @@ pub fn on_web_content_process_terminated(webview: &tauri::Webview) {
|
||||
// reload 必须与清理同任务、排在其后,否则清理可能误清重载后新页面的订阅(竞态)。
|
||||
let webview = webview.clone();
|
||||
crate::process::AsyncHandler::spawn(move || async move {
|
||||
if let Err(err) = handle::Handle::mihomo().await.clear_all_ws_connections().await {
|
||||
if let Err(err) = handle::Handle::mihomo().clear_all_ws_connections().await {
|
||||
logging!(warn, Type::Window, "清理 Mihomo WebSocket 连接失败: {err}");
|
||||
} else {
|
||||
logging!(info, Type::Window, "已清理全部 Mihomo WebSocket 连接");
|
||||
|
||||
Reference in New Issue
Block a user