1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-07-14 22:12:33 +02:00

[carbons] Remove erroneous assert statement in connectionClosed()

The assert statement in CarbonManager's connectionClosed() connection
listener callback was erroneous. A connection may be connected, but
never was authenticated. If now the connection is closed, then
carbonsListener was never setup (via the authenticated() callback),
causing the assert to throw an exception.
This commit is contained in:
Florian Schmaus 2021-09-27 14:14:01 +02:00
parent ae4ff244a3
commit ec456399b5

View file

@ -154,8 +154,7 @@ public final class CarbonManager extends Manager {
// because we also reset in authenticated() if the stream got not resumed, but for maximum correctness,
// also reset here.
enabled_state = false;
boolean removed = connection().removeSyncStanzaListener(carbonsListener);
assert removed;
connection().removeSyncStanzaListener(carbonsListener);
}
@Override
public void authenticated(XMPPConnection connection, boolean resumed) {