mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 17:19:39 +02:00
Notify packet sending listeners in new thread
sendListeners are now invoked *after* the packet has been put on the wire. Also sending listener exceptions are not catched and not only NotConnectedExceptions. And a exception does not cause a 'break' but a 'continue' now. Log level is WARNING now.
This commit is contained in:
parent
51d84647f3
commit
9f56842ee4
3 changed files with 57 additions and 35 deletions
|
@ -309,6 +309,9 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
|
|||
private void sendElement(Element element) {
|
||||
try {
|
||||
send(ComposableBody.builder().setPayloadXML(element.toXML().toString()).build());
|
||||
if (element instanceof Packet) {
|
||||
firePacketSendingListeners((Packet) element);
|
||||
}
|
||||
}
|
||||
catch (BOSHException e) {
|
||||
LOGGER.log(Level.SEVERE, "BOSHException in sendPacketInternal", e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue