synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asan...@apache.org
Subject svn commit: r583120 - /webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/LoggingNHttpServiceHandler.java
Date Tue, 09 Oct 2007 11:57:26 GMT
Author: asankha
Date: Tue Oct  9 04:57:26 2007
New Revision: 583120

URL: http://svn.apache.org/viewvc?rev=583120&view=rev
Log:
fix https://issues.apache.org/jira/browse/SYNAPSE-136

Modified:
    webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/LoggingNHttpServiceHandler.java

Modified: webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/LoggingNHttpServiceHandler.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/LoggingNHttpServiceHandler.java?rev=583120&r1=583119&r2=583120&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/LoggingNHttpServiceHandler.java
(original)
+++ webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/LoggingNHttpServiceHandler.java
Tue Oct  9 04:57:26 2007
@@ -25,6 +25,7 @@
 import org.apache.http.Header;
 import org.apache.http.HttpException;
 import org.apache.http.HttpRequest;
+import org.apache.http.ConnectionClosedException;
 import org.apache.http.nio.ContentDecoder;
 import org.apache.http.nio.ContentEncoder;
 import org.apache.http.nio.NHttpServerConnection;
@@ -65,7 +66,16 @@
     }
 
     public void exception(final NHttpServerConnection conn, final IOException ex) {
-        this.log.error("HTTP connection " + conn + ": " + ex.getMessage(), ex);
+        if (ex instanceof ConnectionClosedException ||
+                ex.getMessage().contains("Connection reset by peer") ||
+                ex.getMessage().contains("forcibly closed")) {
+            if (this.log.isDebugEnabled()) {
+                this.log.debug("HTTP connection " + conn + ": " + ex.getMessage() +
+                    " (Probably the keepalive connection was closed)");
+            }
+        } else {
+            this.log.error("HTTP connection " + conn + ": " + ex.getMessage(), ex);
+        }
         this.handler.exception(conn, ex);
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Mime
View raw message