Commit 7a565c7a authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Improved logging.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1530 b35dd754-fafc-0310-a699-88a17e54d16e
parent eced316d
......@@ -15,7 +15,7 @@ import org.dom4j.Element;
import org.dom4j.io.XPPPacketReader;
import org.jivesoftware.util.Log;
import java.net.SocketException;
import java.io.IOException;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
......@@ -99,7 +99,7 @@ public class OutgoingServerSocketReader {
elements.add(doc);
}
}
catch (SocketException e) {
catch (IOException e) {
String message = "Finishing Outgoing Server Reader. ";
if (session != null) {
message = message + "Closing session: " + session.toString();
......
......@@ -31,6 +31,7 @@ import org.xmpp.packet.StreamError;
import javax.net.SocketFactory;
import java.io.*;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.concurrent.TimeUnit;
/**
......@@ -180,8 +181,19 @@ class ServerDialback {
connection.close();
}
}
catch (UnknownHostException e) {
Log.debug("Error connecting to the remote server: " + hostname + "(DNS lookup: " +
realHostname +
")",
e);
// Close the connection
if (connection != null) {
connection.close();
}
}
catch (Exception e) {
Log.error("Error connecting to the remote server: " + hostname + "(DNS lookup: " +
Log.error("Error creating outgoing session to remote server: " + hostname +
"(DNS lookup: " +
realHostname +
")",
e);
......
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