mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-08 02:52:07 +08:00
chore: bump tauri-plugin-mihomo to 0.1.8
This commit is contained in:
@@ -3,7 +3,7 @@ use anyhow::Result;
|
||||
use serde::Deserialize;
|
||||
use serde_json::Value;
|
||||
use std::time::Duration;
|
||||
use tauri_plugin_mihomo::models::{ConnectionId, WebSocketMessage};
|
||||
use tauri_plugin_mihomo::models::{WebSocketConnectionId, WebSocketMessage};
|
||||
use tokio::sync::mpsc;
|
||||
use tokio::time::Instant;
|
||||
|
||||
@@ -39,7 +39,7 @@ enum InternalWsEvent<T> {
|
||||
/// Mihomo WebSocket 订阅句柄(通用事件流)。
|
||||
pub struct MihomoWsEventStream<T> {
|
||||
/// 当前订阅连接 ID,用于主动断开。
|
||||
pub connection_id: ConnectionId,
|
||||
pub connection_id: WebSocketConnectionId,
|
||||
/// 当前订阅消息接收器。
|
||||
receiver: mpsc::Receiver<InternalWsEvent<T>>,
|
||||
/// 最近一次收到有效事件的时间戳。
|
||||
@@ -162,7 +162,7 @@ impl<T> MihomoWsEventStream<T> {
|
||||
///
|
||||
/// # Arguments
|
||||
/// * `connection_id` - 目标连接 ID
|
||||
pub async fn disconnect_connection(connection_id: ConnectionId) {
|
||||
pub async fn disconnect_connection(connection_id: WebSocketConnectionId) {
|
||||
if let Err(err) = handle::Handle::mihomo()
|
||||
.await
|
||||
.disconnect(connection_id, Some(MIHOMO_WS_STREAM_CLOSE_CODE))
|
||||
|
||||
Reference in New Issue
Block a user