From 07539820c364a50bd9da11a7c922b14a76b478f0 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 13 Jan 2015 10:40:45 +0100 Subject: [PATCH] =?UTF-8?q?Make=20addStanzaAck=E2=80=A6Listener()=20not=20?= =?UTF-8?q?throw?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit users may want to add listeners before the connection is connected. The comment was also wrong, those listeners never got auto removed. --- .../java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java index a68e7e108..df0166879 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java @@ -1494,13 +1494,8 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { *

* * @param listener the listener to add. - * @throws StreamManagementNotEnabledException if Stream Management is not enabled. */ - public void addStanzaAcknowledgedListener(PacketListener listener) throws StreamManagementNotEnabledException { - // Prevent users from adding callbacks that will never get removed - if (!smWasEnabledAtLeastOnce) { - throw new StreamManagementException.StreamManagementNotEnabledException(); - } + public void addStanzaAcknowledgedListener(PacketListener listener) { stanzaAcknowledgedListeners.add(listener); }