wraped stanza writer in try catch

This commit is contained in:
iNPUTmice 2014-06-25 17:15:40 +02:00
parent eb21475658
commit 16c63c91e2
1 changed files with 11 additions and 5 deletions

View File

@ -78,13 +78,19 @@ public class TagWriter {
}
public TagWriter writeStanzaAsync(AbstractStanza stanza) {
try {
if (finshed) {
return this;
} else {
if (!asyncStanzaWriter.isAlive()) asyncStanzaWriter.start();
if (!asyncStanzaWriter.isAlive()) {
asyncStanzaWriter.start();
}
writeQueue.add(stanza);
return this;
}
} catch (IllegalThreadStateException e) {
return this;
}
}
public void finish() {