mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 01:32:17 -05:00
wraped stanza writer in try catch
This commit is contained in:
parent
eb21475658
commit
16c63c91e2
@ -78,11 +78,17 @@ public class TagWriter {
|
||||
}
|
||||
|
||||
public TagWriter writeStanzaAsync(AbstractStanza stanza) {
|
||||
if (finshed) {
|
||||
return this;
|
||||
} else {
|
||||
if (!asyncStanzaWriter.isAlive()) asyncStanzaWriter.start();
|
||||
writeQueue.add(stanza);
|
||||
try {
|
||||
if (finshed) {
|
||||
return this;
|
||||
} else {
|
||||
if (!asyncStanzaWriter.isAlive()) {
|
||||
asyncStanzaWriter.start();
|
||||
}
|
||||
writeQueue.add(stanza);
|
||||
return this;
|
||||
}
|
||||
} catch (IllegalThreadStateException e) {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user