cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject [1/7] cxf git commit: Fix read timeout when underlying Connection Pool cannot provide a connection right away
Date Tue, 08 Nov 2016 07:56:41 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 4ca530b75 -> caac86161


Fix read timeout when underlying Connection Pool cannot provide a connection right away


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a857349e
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a857349e
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a857349e

Branch: refs/heads/master
Commit: a857349e851ee1aee9fa053e033473d5dae31e3c
Parents: 1ffd27f
Author: William Montaz <wmontaz@voyages-sncf.com>
Authored: Wed Nov 2 15:46:54 2016 +0100
Committer: William Montaz <wmontaz@voyages-sncf.com>
Committed: Wed Nov 2 15:46:54 2016 +0100

----------------------------------------------------------------------
 .../cxf/transport/http/asyncclient/AsyncHTTPConduit.java       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/a857349e/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
b/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
old mode 100644
new mode 100755
index 0ebcb81..1234ba4
--- a/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
+++ b/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
@@ -471,6 +471,7 @@ public class AsyncHTTPConduit extends URLConnectionHTTPConduit {
                     outbuf.shutdown();
                 }
                 public void cancelled() {
+                    handleCancelled();
                     inbuf.shutdown();
                     outbuf.shutdown();
                 }
@@ -610,12 +611,15 @@ public class AsyncHTTPConduit extends URLConnectionHTTPConduit {
             }
             notifyAll();
         }
+        protected synchronized void handleCancelled(){
+            notifyAll();
+        }
 
         protected synchronized HttpResponse getHttpResponse() throws IOException {
             while (httpResponse == null) {
                 if (exception == null) { //already have an exception, skip waiting
                     try {
-                        wait(csPolicy.getReceiveTimeout());
+                        wait();
                     } catch (InterruptedException e) {
                         throw new IOException(e);
                     }


Mime
View raw message