mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 09:39:39 +02:00
Packet writer errors will now notify listeners of errors (SMACK-85)
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2092 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
89fa351758
commit
d843cc9a77
3 changed files with 28 additions and 18 deletions
|
@ -53,6 +53,7 @@
|
|||
package org.jivesoftware.smack;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.Iterator;
|
||||
import java.io.*;
|
||||
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
|
@ -145,7 +146,6 @@ class PacketWriter {
|
|||
stream.append(" to=\"" + connection.getHost() + "\"");
|
||||
stream.append(" xmlns=\"jabber:client\"");
|
||||
stream.append(" xmlns:stream=\"http://etherx.jabber.org/streams\">");
|
||||
// stream.append("xmlns:sasl=\"http://www.iana.org/assignments/sasl-mechanisms\" ");
|
||||
writer.write(stream.toString());
|
||||
writer.flush();
|
||||
stream = null;
|
||||
|
@ -170,8 +170,8 @@ class PacketWriter {
|
|||
}
|
||||
catch (IOException ioe){
|
||||
if (!done) {
|
||||
ioe.printStackTrace();
|
||||
connection.close();
|
||||
done = true;
|
||||
connection.packetReader.notifyConnectionError(ioe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue