[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.
master
Florian Schmaus 10 months ago
parent ae4ff244a3
commit ec456399b5
  1. 3
      smack-experimental/src/main/java/org/jivesoftware/smackx/carbons/CarbonManager.java

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

Loading…
Cancel
Save