From 987744bb2546d3df2c083f34b1c6b8a12453db1b Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 31 Aug 2019 15:44:48 +0200 Subject: fixed unlikely race between enabling carbons and discovering last MAM id --- src/main/java/de/pixart/messenger/xmpp/XmppConnection.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/de/pixart/messenger') diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java index 596975cd1..9ff9e8bce 100644 --- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java +++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java @@ -1298,9 +1298,6 @@ public class XmppConnection implements Runnable { } private void enableAdvancedStreamFeatures() { - if (getFeatures().carbons() && !features.carbonsEnabled) { - sendEnableCarbons(); - } if (getFeatures().blocking() && !features.blockListRequested) { Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": Requesting block list"); this.sendIqPacket(getIqGenerator().generateGetBlockList(), mXmppConnectionService.getIqParser()); @@ -1308,6 +1305,9 @@ public class XmppConnection implements Runnable { for (final OnAdvancedStreamFeaturesLoaded listener : advancedStreamFeaturesLoadedListeners) { listener.onAdvancedStreamFeaturesAvailable(account); } + if (getFeatures().carbons() && !features.carbonsEnabled) { + sendEnableCarbons(); + } } private void sendServiceDiscoveryItems(final Jid server) { -- cgit v1.2.3