aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/eu/siacs/conversations/xml/TagWriter.java10
1 files changed, 5 insertions, 5 deletions
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() {