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

Do not log warning for AsynchronousCloseException.

git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@2905 b35dd754-fafc-0310-a699-88a17e54d16e
parent f7ac921d
......@@ -14,11 +14,10 @@ package org.jivesoftware.messenger.net;
import org.dom4j.Element;
import org.dom4j.io.XPPPacketReader;
import org.jivesoftware.messenger.*;
import org.jivesoftware.messenger.server.OutgoingSessionPromise;
import org.jivesoftware.messenger.auth.UnauthorizedException;
import org.jivesoftware.messenger.component.InternalComponentManager;
import org.jivesoftware.messenger.interceptor.InterceptorManager;
import org.jivesoftware.messenger.interceptor.PacketRejectedException;
import org.jivesoftware.messenger.server.OutgoingSessionPromise;
import org.jivesoftware.util.LocaleUtils;
import org.jivesoftware.util.Log;
import org.xmlpull.v1.XmlPullParser;
......@@ -32,6 +31,7 @@ import java.io.InputStreamReader;
import java.io.Writer;
import java.net.Socket;
import java.net.SocketException;
import java.nio.channels.AsynchronousCloseException;
/**
* A SocketReader creates the appropriate {@link Session} based on the defined namespace in the
......@@ -122,6 +122,9 @@ public abstract class SocketReader implements Runnable {
// The socket was closed. The server may close the connection for several
// reasons (e.g. user requested to remove his account). Do nothing here.
}
catch (AsynchronousCloseException ace) {
// The socket was closed.
}
catch (XmlPullParserException ie) {
// It is normal for clients to abruptly cut a connection
// rather than closing the stream document. Since this is
......@@ -231,7 +234,7 @@ public abstract class SocketReader implements Runnable {
continue;
}
processIQ(packet);
}
}
else if ("starttls".equals(tag)) {
// Client requested to secure the connection using TLS
connection.deliverRawText("<proceed xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\"/>");
......@@ -259,7 +262,7 @@ public abstract class SocketReader implements Runnable {
}
continue;
}
else {
else {
if (!processUnknowPacket(doc)) {
Log.warn(LocaleUtils.getLocalizedString("admin.error.packet.tag") +
doc.asXML());
......
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