Commit eb28c633 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Close the connection if no data has been received for a while. JM-486

git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@3188 b35dd754-fafc-0310-a699-88a17e54d16e
parent fa3bec5c
...@@ -25,7 +25,6 @@ import org.jivesoftware.util.Log; ...@@ -25,7 +25,6 @@ import org.jivesoftware.util.Log;
import org.jivesoftware.util.StringUtils; import org.jivesoftware.util.StringUtils;
import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
import org.xmpp.packet.JID; import org.xmpp.packet.JID;
import org.xmpp.packet.Packet; import org.xmpp.packet.Packet;
...@@ -280,7 +279,6 @@ public class OutgoingServerSession extends Session { ...@@ -280,7 +279,6 @@ public class OutgoingServerSession extends Session {
connection.deliverRawText(openingStream.toString()); connection.deliverRawText(openingStream.toString());
XPPPacketReader reader = new XPPPacketReader(); XPPPacketReader reader = new XPPPacketReader();
reader.setXPPFactory(XmlPullParserFactory.newInstance());
reader.getXPPParser().setInput(new InputStreamReader(socket.getInputStream(), reader.getXPPParser().setInput(new InputStreamReader(socket.getInputStream(),
CHARSET)); CHARSET));
// Get the answer from the Receiving Server // Get the answer from the Receiving Server
......
...@@ -18,6 +18,7 @@ import org.jivesoftware.messenger.*; ...@@ -18,6 +18,7 @@ import org.jivesoftware.messenger.*;
import org.jivesoftware.messenger.auth.AuthFactory; import org.jivesoftware.messenger.auth.AuthFactory;
import org.jivesoftware.messenger.net.DNSUtil; import org.jivesoftware.messenger.net.DNSUtil;
import org.jivesoftware.messenger.net.SocketConnection; import org.jivesoftware.messenger.net.SocketConnection;
import org.jivesoftware.messenger.net.MXParser;
import org.jivesoftware.messenger.spi.BasicStreamIDFactory; import org.jivesoftware.messenger.spi.BasicStreamIDFactory;
import org.jivesoftware.util.Log; import org.jivesoftware.util.Log;
import org.jivesoftware.util.StringUtils; import org.jivesoftware.util.StringUtils;
...@@ -66,7 +67,7 @@ class ServerDialback { ...@@ -66,7 +67,7 @@ class ServerDialback {
static { static {
try { try {
FACTORY = XmlPullParserFactory.newInstance(); FACTORY = XmlPullParserFactory.newInstance(MXParser.class.getName(), null);
} }
catch (XmlPullParserException e) { catch (XmlPullParserException e) {
Log.error("Error creating a parser factory", e); Log.error("Error creating a parser factory", e);
...@@ -145,7 +146,7 @@ class ServerDialback { ...@@ -145,7 +146,7 @@ class ServerDialback {
stream = null; stream = null;
XPPPacketReader reader = new XPPPacketReader(); XPPPacketReader reader = new XPPPacketReader();
reader.setXPPFactory(XmlPullParserFactory.newInstance()); reader.setXPPFactory(FACTORY);
reader.getXPPParser().setInput(new InputStreamReader(socket.getInputStream(), reader.getXPPParser().setInput(new InputStreamReader(socket.getInputStream(),
CHARSET)); CHARSET));
// Get the answer from the Receiving Server // Get the answer from the Receiving Server
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment