mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +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>
|
* </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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue