From 1561b7587aaf64d29e728b11c161ca89d34b7f4c Mon Sep 17 00:00:00 2001 From: Schmiddiii Date: Sat, 30 Dec 2023 15:29:46 +0100 Subject: [PATCH] Expose SignalWebSocket::is_used --- libsignal-service/src/websocket.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libsignal-service/src/websocket.rs b/libsignal-service/src/websocket.rs index 8769533d0..63aa1a17c 100644 --- a/libsignal-service/src/websocket.rs +++ b/libsignal-service/src/websocket.rs @@ -313,6 +313,10 @@ impl SignalWebSocket { self.request_sink.is_closed() } + pub fn is_used(&self) -> bool { + self.inner_locked().stream.is_none() + } + pub(crate) fn take_request_stream( &mut self, ) -> Option {