From 513b3959dcb60dff5b0c176fab4824c0263eeff1 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Wed, 25 Jun 2014 19:16:10 +0200 Subject: moved some try catchs around --- src/eu/siacs/conversations/xml/TagWriter.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/eu') diff --git a/src/eu/siacs/conversations/xml/TagWriter.java b/src/eu/siacs/conversations/xml/TagWriter.java index 95436f05..23a260f2 100644 --- a/src/eu/siacs/conversations/xml/TagWriter.java +++ b/src/eu/siacs/conversations/xml/TagWriter.java @@ -78,19 +78,19 @@ public class TagWriter { } public TagWriter writeStanzaAsync(AbstractStanza stanza) { - try { if (finshed) { return this; } else { if (!asyncStanzaWriter.isAlive()) { - asyncStanzaWriter.start(); + try { + asyncStanzaWriter.start(); + } catch (IllegalThreadStateException e) { + //already started + } } writeQueue.add(stanza); return this; } - } catch (IllegalThreadStateException e) { - return this; - } } public void finish() { -- cgit v1.2.3