From 3ebcd89df562f3cb648b879d72a8f1dddd5ff6b3 Mon Sep 17 00:00:00 2001 From: Charles Schleich Date: Mon, 23 Dec 2024 14:10:32 +0100 Subject: [PATCH] add is_closed, on session --- zenoh-ts/src/session.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zenoh-ts/src/session.ts b/zenoh-ts/src/session.ts index b38adc9..265ef15 100644 --- a/zenoh-ts/src/session.ts +++ b/zenoh-ts/src/session.ts @@ -202,6 +202,9 @@ export class Session { Session.registry.unregister(this); } + async is_closed(){ + return this.remote_session.ws.readyState == WebSocket.CLOSED; + } /** * Puts a value on the session, on a specific key expression KeyExpr *