mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-25 05:22:06 +01:00
Send a final SM Ack on shutdown()
This commit is contained in:
parent
65ccec995e
commit
765e83ca81
1 changed files with 9 additions and 0 deletions
|
@ -487,6 +487,15 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void shutdown() {
|
protected void shutdown() {
|
||||||
|
if (isSmEnabled()) {
|
||||||
|
try {
|
||||||
|
// Try to send a last SM Acknowledgement. Most servers won't find this information helpful, as the SM
|
||||||
|
// state is dropped after a clean disconnect anyways. OTOH it doesn't hurt much either.
|
||||||
|
sendSmAcknowledgementInternal();
|
||||||
|
} catch (NotConnectedException e) {
|
||||||
|
LOGGER.log(Level.FINE, "Can not send final SM ack as connection is not connected", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
shutdown(false);
|
shutdown(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue