fixed unlikely race between enabling carbons and discovering last MAM id
This commit is contained in:
parent
c92cc5f5b7
commit
98eb49904c
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue