From 9e59659073ec51e4090ca53bf2447984efad74c3 Mon Sep 17 00:00:00 2001 From: Arjen <18398758+Origami74@users.noreply.github.com> Date: Tue, 16 Jun 2026 14:17:28 +0200 Subject: [PATCH] =?UTF-8?q?feat(ble):=20AndroidBleBridge::channel=5Fopen?= =?UTF-8?q?=20=E2=80=94=20let=20next=5Fsend=20tell=20closed=20from=20timeo?= =?UTF-8?q?ut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/transport/ble/android_io.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/transport/ble/android_io.rs b/src/transport/ble/android_io.rs index 3d9fceb..49317cd 100644 --- a/src/transport/ble/android_io.rs +++ b/src/transport/ble/android_io.rs @@ -280,6 +280,12 @@ impl AndroidBleBridge { drop(state); } } + + /// Whether `ch_id` is still registered. The JNI `next_send` export uses this + /// to tell a timeout (loop again) from a closed channel (stop the writer). + pub fn channel_open(&self, ch_id: i64) -> bool { + self.lock_channels().contains_key(&ch_id) + } } // ============================================================================