hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r615584 - /httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
Date Sun, 27 Jan 2008 12:07:43 GMT
Author: olegk
Date: Sun Jan 27 04:07:42 2008
New Revision: 615584

URL: http://svn.apache.org/viewvc?rev=615584&view=rev
Log:
HTTPCLIENT-734: Set release trigger on a managed connection as soon as it is allocated by
the connection manager

Modified:
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java?rev=615584&r1=615583&r2=615584&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
Sun Jan 27 04:07:42 2008
@@ -292,6 +292,11 @@
                 if (managedConn == null) {
                     managedConn = allocateConnection(route, timeout);
                 }
+
+                if (orig instanceof AbortableHttpRequest) {
+                    ((AbortableHttpRequest) orig).setReleaseTrigger(managedConn);
+                }
+
                 // Reopen connection if needed
                 if (!managedConn.isOpen()) {
                     managedConn.open(route, context, params);
@@ -347,10 +352,6 @@
                         proxyAuthState);
                 requestExec.preProcess(reqwrap, httpProcessor, context);
                 
-                if (orig instanceof AbortableHttpRequest) {
-                    ((AbortableHttpRequest) orig).setReleaseTrigger(managedConn);
-                }
-
                 context.setAttribute(ExecutionContext.HTTP_REQUEST,
                         reqwrap);
 



Mime
View raw message