From 1577fa1fcada9523d03a0d9fffad43e9649938f4 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 16 Feb 2015 13:29:14 +0100 Subject: [PATCH] Fix duplicate presence in XMPPBOSHConnection.shutdown() --- .../smack/bosh/XMPPBOSHConnection.java | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java b/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java index e4f203698..1bc1e1492 100644 --- a/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java +++ b/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java @@ -39,7 +39,6 @@ import org.jivesoftware.smack.packet.Message; import org.jivesoftware.smack.packet.Stanza; import org.jivesoftware.smack.packet.PlainStreamElement; import org.jivesoftware.smack.packet.Presence; -import org.jivesoftware.smack.packet.Presence.Type; import org.jivesoftware.smack.sasl.packet.SaslStreamElements.SASLFailure; import org.jivesoftware.smack.sasl.packet.SaslStreamElements.Success; import org.jivesoftware.smack.util.PacketParserUtils; @@ -288,19 +287,6 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection { connected = false; isFirstInitialization = false; - Presence unavailablePresence = new Presence(Type.unavailable); - try { - client.disconnect(ComposableBody.builder() - .setNamespaceDefinition("xmpp", XMPP_BOSH_NS) - .setPayloadXML(unavailablePresence.toXML().toString()) - .build()); - // Wait 150 ms for processes to clean-up, then shutdown. - Thread.sleep(150); - } - catch (Exception e) { - // Ignore. - } - // Close down the readers and writers. if (readerPipe != null) { try {