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:
parent
c682091a47
commit
07539820c3
1 changed files with 1 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue