1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 02:27:58 +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>
*
* @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);
}