diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-09-30 23:42:02 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-09-30 23:42:02 +0200 |
commit | 9dcf074a79856b866d38174c248ef16987e7ea16 (patch) | |
tree | a0e55d81e8184df5c649a22fd95700cc4127959c /src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | |
parent | 648e29db2cd8e5b170a90e93c5957b77ce1b0e8e (diff) |
request stanza count after every ibb data stanza to not fill our own stanza queue
Diffstat (limited to 'src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 9527ee23d..c41b69748 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -957,7 +957,6 @@ public class XmppConnection implements Runnable { disconnect(true); return; } - final String name = packet.getName(); tagWriter.writeStanzaAsync(packet); if (packet instanceof AbstractAcknowledgeableStanza) { AbstractAcknowledgeableStanza stanza = (AbstractAcknowledgeableStanza) packet; @@ -973,9 +972,7 @@ public class XmppConnection implements Runnable { } public void sendPing() { - if (streamFeatures.hasChild("sm")) { - tagWriter.writeStanzaAsync(new RequestPacket(smVersion)); - } else { + if (!r()) { final IqPacket iq = new IqPacket(IqPacket.TYPE.GET); iq.setFrom(account.getJid()); iq.addChild("ping", "urn:xmpp:ping"); @@ -1086,8 +1083,13 @@ public class XmppConnection implements Runnable { return null; } - public void r() { - this.tagWriter.writeStanzaAsync(new RequestPacket(smVersion)); + public boolean r() { + if (getFeatures().sm()) { + this.tagWriter.writeStanzaAsync(new RequestPacket(smVersion)); + return true; + } else { + return false; + } } public String getMucServer() { |