From 51b167c0d448f2afef6de71e10ea54e9443527af Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 7 Apr 2020 23:13:03 +0200 Subject: [PATCH] tcp: do not flush after writing the SM ack There is no need to flush here, as writePackets() will eventually flush the data out. --- .../main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java | 1 - 1 file changed, 1 deletion(-) diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java index 47452a11a..9c2c1a686 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java @@ -1445,7 +1445,6 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { // from the server in order to drain it if (unacknowledgedStanzas.size() == UNACKKNOWLEDGED_STANZAS_QUEUE_SIZE_HIGH_WATER_MARK) { writer.write(AckRequest.INSTANCE.toXML().toString()); - writer.flush(); } try { // It is important the we put the stanza in the unacknowledged stanza