moved some try catchs around
This commit is contained in:
parent
66bb5c9b51
commit
513b3959dc
|
@ -78,19 +78,19 @@ public class TagWriter {
|
||||||
}
|
}
|
||||||
|
|
||||||
public TagWriter writeStanzaAsync(AbstractStanza stanza) {
|
public TagWriter writeStanzaAsync(AbstractStanza stanza) {
|
||||||
try {
|
|
||||||
if (finshed) {
|
if (finshed) {
|
||||||
return this;
|
return this;
|
||||||
} else {
|
} else {
|
||||||
if (!asyncStanzaWriter.isAlive()) {
|
if (!asyncStanzaWriter.isAlive()) {
|
||||||
asyncStanzaWriter.start();
|
try {
|
||||||
|
asyncStanzaWriter.start();
|
||||||
|
} catch (IllegalThreadStateException e) {
|
||||||
|
//already started
|
||||||
|
}
|
||||||
}
|
}
|
||||||
writeQueue.add(stanza);
|
writeQueue.add(stanza);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
} catch (IllegalThreadStateException e) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void finish() {
|
public void finish() {
|
||||||
|
|
Loading…
Reference in New Issue