From 418dd24392a87b979281f40c943a8872a2aedb3e Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 27 Oct 2013 17:40:06 +0000 Subject: [PATCH] SMACK-373 Don't remove listeners after a disconnect() , keep state of Connection between disconnect() and connect()/login() git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_2@13793 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/PacketReader.java | 8 -------- source/org/jivesoftware/smack/PacketWriter.java | 8 -------- source/org/jivesoftware/smack/Roster.java | 7 ------- source/org/jivesoftware/smack/XMPPConnection.java | 8 -------- 4 files changed, 31 deletions(-) diff --git a/source/org/jivesoftware/smack/PacketReader.java b/source/org/jivesoftware/smack/PacketReader.java index 3ec83ac0e..e62d240e2 100644 --- a/source/org/jivesoftware/smack/PacketReader.java +++ b/source/org/jivesoftware/smack/PacketReader.java @@ -144,14 +144,6 @@ class PacketReader { listenerExecutor.shutdown(); } - /** - * Cleans up all resources used by the packet reader. - */ - void cleanup() { - connection.recvListeners.clear(); - connection.collectors.clear(); - } - /** * Resets the parser using the latest connection's reader. Reseting the parser is necessary * when the plain connection has been secured or when a new opening stream element is going diff --git a/source/org/jivesoftware/smack/PacketWriter.java b/source/org/jivesoftware/smack/PacketWriter.java index 3fe4db09f..7e347cb7d 100644 --- a/source/org/jivesoftware/smack/PacketWriter.java +++ b/source/org/jivesoftware/smack/PacketWriter.java @@ -125,14 +125,6 @@ class PacketWriter { } } - /** - * Cleans up all resources used by the packet writer. - */ - void cleanup() { - connection.interceptors.clear(); - connection.sendListeners.clear(); - } - /** * Returns the next available packet from the queue for writing. * diff --git a/source/org/jivesoftware/smack/Roster.java b/source/org/jivesoftware/smack/Roster.java index 93f3ccf96..b56afac1a 100644 --- a/source/org/jivesoftware/smack/Roster.java +++ b/source/org/jivesoftware/smack/Roster.java @@ -582,13 +582,6 @@ public class Roster { } } - /** - * Cleans up all resources used by the roster. - */ - void cleanup() { - rosterListeners.clear(); - } - /** * Returns the key to use in the presenceMap for a fully qualified XMPP ID. * The roster can contain any valid address format such us "domain/resource", diff --git a/source/org/jivesoftware/smack/XMPPConnection.java b/source/org/jivesoftware/smack/XMPPConnection.java index 0e3fd65c7..f442e7386 100644 --- a/source/org/jivesoftware/smack/XMPPConnection.java +++ b/source/org/jivesoftware/smack/XMPPConnection.java @@ -475,15 +475,7 @@ public class XMPPConnection extends Connection { shutdown(unavailablePresence); - if (roster != null) { - roster.cleanup(); - roster = null; - } - wasAuthenticated = false; - - packetWriter.cleanup(); - packetReader.cleanup(); } public void sendPacket(Packet packet) {