From 3ffdb9befd59cabee51b94a11312034685447671 Mon Sep 17 00:00:00 2001 From: damencho Date: Thu, 23 Aug 2018 16:22:25 -0500 Subject: [PATCH] Clears bosh client instance on shutdown. Fixes SMACK-829. --- .../jivesoftware/smack/bosh/XMPPBOSHConnection.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 756c2d885..8fba8051a 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 @@ -253,6 +253,16 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection { */ @Override protected void shutdown() { + + if (client != null) { + try { + client.disconnect(); + } catch (Exception e) { + LOGGER.log(Level.WARNING, "shutdown", e); + } + client = null; + } + setWasAuthenticated(); sessionID = null; done = true;