From 0893c9783cf6e8866d92884f61e81e2a2e7424c5 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 6 Mar 2026 13:51:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BF=83=E8=B7=B3?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E4=B8=AD=E8=AE=A2=E9=98=85=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E6=97=B6=E8=AF=AF=E8=A7=A6=E5=8F=91=E9=87=8D?= =?UTF-8?q?=E8=BF=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/connection.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/connection.rs b/src/connection.rs index d602ae4..d277ddf 100644 --- a/src/connection.rs +++ b/src/connection.rs @@ -296,7 +296,7 @@ impl ConnectionManager { Err(_) => false, }; - // 检查订阅状态 + // 检查订阅状态 - 仅当有 subscription_id 时才检查 let subscription_valid = { let status = manager.status.read().await; if let Some(conn_status) = status.get(&source_id) { @@ -315,9 +315,11 @@ impl ConnectionManager { Err(_) => false, } } else { - false + // 没有 subscription_id 时,认为订阅状态有效(不需要检查) + true } } else { + // 没有连接状态时,认为订阅状态无效 false } };