cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject [3/7] cxf git commit: Fix timeout handling by non async requests
Date Tue, 08 Nov 2016 07:56:43 GMT
Fix timeout handling by non async requests


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

Branch: refs/heads/master
Commit: 1c34659984b1c3a64463471166a4c772597c0ac8
Parents: db55b10
Author: William Montaz <wmontaz@voyages-sncf.com>
Authored: Thu Nov 3 15:03:52 2016 +0100
Committer: William Montaz <wmontaz@voyages-sncf.com>
Committed: Thu Nov 3 15:03:52 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/1c346599/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
index 72c6ebf..76f333b 100755
--- 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
@@ -619,7 +619,11 @@ public class AsyncHTTPConduit extends URLConnectionHTTPConduit {
             while (httpResponse == null) {
                 if (exception == null) { //already have an exception, skip waiting
                     try {
-                        wait();
+                        if (isAsync) {
+                            wait();
+                        } else {
+                            wait(csPolicy.getReceiveTimeout());
+                        }
                     } catch (InterruptedException e) {
                         throw new IOException(e);
                     }


Mime
View raw message