1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 03:52:06 +01:00

Make addStanzaAck…Listener() not throw

users may want to add listeners before the connection is connected. The
comment was also wrong, those listeners never got auto removed.
This commit is contained in:
Florian Schmaus 2015-01-13 10:40:45 +01:00
parent c682091a47
commit 07539820c3

View file

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