Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 9e9dd3949 -> c06cc6dcf


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

(cherry picked from commit a857349e851ee1aee9fa053e033473d5dae31e3c)


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

Branch: refs/heads/3.1.x-fixes
Commit: 156ea7366ce5aa70fcacec8868b41c9c54de40a1
Parents: 9e9dd39
Author: William Montaz <[email protected]>
Authored: Wed Nov 2 15:46:54 2016 +0100
Committer: Freeman Fang <[email protected]>
Committed: Tue Nov 8 15:58:56 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/156ea736/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);
                     }

Reply via email to