fixed unlikely race between enabling carbons and discovering last MAM id

This commit is contained in:
Daniel Gultsch 2019-08-22 09:57:39 +02:00
parent c92cc5f5b7
commit 98eb49904c

View file

@ -1254,9 +1254,6 @@ public class XmppConnection implements Runnable {
} }
private void enableAdvancedStreamFeatures() { private void enableAdvancedStreamFeatures() {
if (getFeatures().carbons() && !features.carbonsEnabled) {
sendEnableCarbons();
}
if (getFeatures().blocking() && !features.blockListRequested) { if (getFeatures().blocking() && !features.blockListRequested) {
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": Requesting block list"); Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": Requesting block list");
this.sendIqPacket(getIqGenerator().generateGetBlockList(), mXmppConnectionService.getIqParser()); this.sendIqPacket(getIqGenerator().generateGetBlockList(), mXmppConnectionService.getIqParser());
@ -1264,6 +1261,9 @@ public class XmppConnection implements Runnable {
for (final OnAdvancedStreamFeaturesLoaded listener : advancedStreamFeaturesLoadedListeners) { for (final OnAdvancedStreamFeaturesLoaded listener : advancedStreamFeaturesLoadedListeners) {
listener.onAdvancedStreamFeaturesAvailable(account); listener.onAdvancedStreamFeaturesAvailable(account);
} }
if (getFeatures().carbons() && !features.carbonsEnabled) {
sendEnableCarbons();
}
} }
private void sendServiceDiscoveryItems(final Jid server) { private void sendServiceDiscoveryItems(final Jid server) {