From 54be3cab2381df32bac8bf4f0981d962d3aefd10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E6=AD=A3=E8=B6=85?= Date: Tue, 19 May 2026 23:34:22 +0800 Subject: [PATCH] fix(heal): ignore missing response subscribers (#3015) * fix(heal): ignore missing response subscribers * fix(heal): ignore missing response subscribers --- crates/common/src/heal_channel.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/common/src/heal_channel.rs b/crates/common/src/heal_channel.rs index e76f84180..662eda529 100644 --- a/crates/common/src/heal_channel.rs +++ b/crates/common/src/heal_channel.rs @@ -379,7 +379,9 @@ fn heal_response_sender() -> &'static HealResponseSender { /// Publish a heal response to subscribers. pub fn publish_heal_response(response: HealChannelResponse) -> Result<(), broadcast::error::SendError> { - heal_response_sender().send(response).map(|_| ()) + let sender = heal_response_sender(); + let _ = sender.send(response); + Ok(()) } /// Subscribe to heal responses. @@ -626,5 +628,10 @@ mod tests { let received = receiver.recv().await.expect("should receive heal response"); assert_eq!(received.request_id, response.request_id); assert!(received.success); + + drop(receiver); + let response = create_heal_response("req-no-subscriber".to_string(), true, None, None); + + publish_heal_response(response).expect("publish without subscribers should be ignored"); } }