From d41020ccf3781fbfac45f8bac2249d9ac6ec9aed Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 5 Aug 2022 10:46:12 +0200 Subject: [PATCH] ignore race condition after reject from notification fixes #4351 fixes #4261 --- .../xmpp/jingle/JingleConnectionManager.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java index 416877236..b39673fa5 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java @@ -892,7 +892,15 @@ public class JingleConnectionManager extends AbstractConnectionManager { for (final AbstractJingleConnection connection : this.connections.values()) { if (connection.getId().sessionId.equals(sessionId)) { if (connection instanceof JingleRtpConnection) { - ((JingleRtpConnection) connection).rejectCall(); + try { + ((JingleRtpConnection) connection).rejectCall(); + return; + } catch (final IllegalStateException e) { + Log.w( + Config.LOGTAG, + "race condition on rejecting call from notification", + e); + } } } }