do not pipeline first SM request because that might fail when resume fails

This commit is contained in:
Christian Schneppe 2017-03-23 23:40:09 +01:00
parent 52a2efe0a8
commit cf87ce792e

View file

@ -612,6 +612,7 @@ public class XmppConnection implements Runnable {
final RequestPacket r = new RequestPacket(smVersion);
tagWriter.writeStanzaAsync(r);
} else if (nextTag.isStart("resumed")) {
this.tagWriter.writeStanzaAsync(new RequestPacket(smVersion));
lastPacketReceived = SystemClock.elapsedRealtime();
final Element resumed = tagReader.readElement(nextTag);
final String h = resumed.getAttribute("h");
@ -890,7 +891,6 @@ public class XmppConnection implements Runnable {
this.mSmCatchupMessageCounter.set(0);
this.mWaitingForSmCatchup.set(true);
this.tagWriter.writeStanzaAsync(resume);
this.tagWriter.writeStanzaAsync(new RequestPacket(smVersion));
} else if (needsBinding) {
if (this.streamFeatures.hasChild("bind")) {
sendBindRequest();