Author: supun
Date: Mon Feb  7 12:54:20 2011
New Revision: 1067940

URL: http://svn.apache.org/viewvc?rev=1067940&view=rev
Log:
applying the patch SYNAPSE-671, thanks Kasun for the contribution

Modified:
    
synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ServerHandler.java

Modified: 
synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ServerHandler.java
URL: 
http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ServerHandler.java?rev=1067940&r1=1067939&r2=1067940&view=diff
==============================================================================
--- 
synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ServerHandler.java
 (original)
+++ 
synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ServerHandler.java
 Mon Feb  7 12:54:20 2011
@@ -205,6 +205,9 @@ public class ServerHandler implements NH
             }
             response.setEntity(entity);
 
+            if (metrics != null) {
+                metrics.incrementMessagesReceived();
+            }
             // hand off processing of the request to a thread off the pool
             ServerWorker worker = new ServerWorker(cfgCtx, conn, isHttps, 
metrics, this,
                         request, is, response, os, restDispatching, 
httpGetRequestProcessor);
@@ -253,10 +256,6 @@ public class ServerHandler implements NH
                 
                 ((ServerConnectionDebug) conn.getContext().getAttribute(
                         
SERVER_CONNECTION_DEBUG)).recordRequestCompletionTime();
-
-                if (metrics != null) {
-                    metrics.incrementMessagesReceived();
-                }
                 // remove the request we have fully read, to detect harmless 
keepalive timeouts from
                 // real timeouts while reading requests
                 context.setAttribute(NhttpConstants.REQUEST_READ, 
Boolean.TRUE);


Reply via email to