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
1 changed files with 1 additions and 6 deletions

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);
}