diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2014-03-12 19:56:06 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-03-12 19:56:06 +0100 |
commit | c67238562ae2228efbe96225b23b2a297aea8f2f (patch) | |
tree | 851aaafe35e6882a9501ea431507ab2f29f1356e /src/eu/siacs/conversations/entities/Conversation.java | |
parent | 848fb2ec24f645d5f4b6e7e2348ddcf6a7dcdeee (diff) |
fixed #9
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/entities/Conversation.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/entities/Conversation.java b/src/eu/siacs/conversations/entities/Conversation.java index 1a4745f9..aad072cf 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() { |