mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 14:02:06 +01:00
Flush IBB output stream before closing it. SMACK-231
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@8539 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
0971f5fffd
commit
8fdd2702db
1 changed files with 2 additions and 1 deletions
|
@ -204,7 +204,7 @@ public class IBBTransferNegotiator extends StreamNegotiator {
|
||||||
count += len;
|
count += len;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void flushBuffer() {
|
private synchronized void flushBuffer() {
|
||||||
writeToXML(buffer, 0, count);
|
writeToXML(buffer, 0, count);
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
|
@ -234,6 +234,7 @@ public class IBBTransferNegotiator extends StreamNegotiator {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void close() throws IOException {
|
public void close() throws IOException {
|
||||||
|
this.flush();
|
||||||
connection.sendPacket(closePacket);
|
connection.sendPacket(closePacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue