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

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) {