mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-30 02:02:06 +01:00
SMACK-419 PacketWriter: Only flush if queue is empty
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13565 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
848d393b73
commit
cb44042d3c
1 changed files with 5 additions and 3 deletions
|
@ -193,9 +193,11 @@ class PacketWriter {
|
||||||
if (packet != null) {
|
if (packet != null) {
|
||||||
synchronized (writer) {
|
synchronized (writer) {
|
||||||
writer.write(packet.toXML());
|
writer.write(packet.toXML());
|
||||||
writer.flush();
|
if (queue.isEmpty()) {
|
||||||
// Keep track of the last time a stanza was sent to the server
|
writer.flush();
|
||||||
lastActive = System.currentTimeMillis();
|
// Keep track of the last time a stanza was sent to the server
|
||||||
|
lastActive = System.currentTimeMillis();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue