mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Cleaned up connection close operation.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1829 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
668ab89ece
commit
5a1f449f03
3 changed files with 13 additions and 5 deletions
|
@ -148,6 +148,7 @@ class PacketWriter {
|
|||
// stream.append("xmlns:sasl=\"http://www.iana.org/assignments/sasl-mechanisms\" ");
|
||||
writer.write(stream.toString());
|
||||
writer.flush();
|
||||
stream = null;
|
||||
// Write out packets from the queue.
|
||||
while (!done) {
|
||||
Packet packet = nextPacket();
|
||||
|
@ -168,8 +169,10 @@ class PacketWriter {
|
|||
}
|
||||
}
|
||||
catch (IOException ioe){
|
||||
ioe.printStackTrace();
|
||||
connection.close();
|
||||
if (!done) {
|
||||
ioe.printStackTrace();
|
||||
connection.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue