From c67238562ae2228efbe96225b23b2a297aea8f2f Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 12 Mar 2014 19:56:06 +0100 Subject: fixed #9 --- src/eu/siacs/conversations/entities/Conversation.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/eu/siacs/conversations/entities') diff --git a/src/eu/siacs/conversations/entities/Conversation.java b/src/eu/siacs/conversations/entities/Conversation.java index 1a4745f9a..aad072cf0 100644 --- a/src/eu/siacs/conversations/entities/Conversation.java +++ b/src/eu/siacs/conversations/entities/Conversation.java @@ -232,13 +232,17 @@ public class Conversation extends AbstractEntity { this.otrSession = null; } - public void endOtrIfNeeded() throws OtrException { + public void endOtrIfNeeded() { if (this.otrSession!=null) { if (this.otrSession.getSessionStatus() == SessionStatus.ENCRYPTED) { - this.otrSession.endSession(); + try { + this.otrSession.endSession(); + this.resetOtrSession(); + } catch (OtrException e) { + this.resetOtrSession(); + } } } - this.resetOtrSession(); } public boolean hasValidOtrSession() { -- cgit v1.2.3