cxf-commits mailing list archives

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

(cherry picked from commit 1c34659984b1c3a64463471166a4c772597c0ac8)


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

Branch: refs/heads/3.1.x-fixes
Commit: 5f4d837a723e97630053aac31797f6cc6eeb61f0
Parents: f3c121d
Author: William Montaz <wmontaz@voyages-sncf.com>
Authored: Thu Nov 3 15:03:52 2016 +0100
Committer: Freeman Fang <freeman.fang@gmail.com>
Committed: Tue Nov 8 15:59:13 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/5f4d837a/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