From 909aa72b258db92f27f3910d978770726ef6f7d6 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 24 Dec 2022 10:55:16 +0100 Subject: [PATCH] catch exception in getSignalingState() --- .../eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java index b929e9509..6c270fbad 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java @@ -662,7 +662,11 @@ public class WebRTCWrapper { } public PeerConnection.SignalingState getSignalingState() { - return requirePeerConnection().signalingState(); + try { + return requirePeerConnection().signalingState(); + } catch (final IllegalStateException e) { + return PeerConnection.SignalingState.CLOSED; + } } EglBase.Context getEglBaseContext() {