[CXF-5564] Set the async flag based on whether the exchange is async or not.
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/49192409 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/49192409 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/49192409 Branch: refs/heads/2.7.x-fixes Commit: 4919240995041e9a7471d63287ab55fb5caaf44a Parents: 39f7b26 Author: Daniel Kulp <[email protected]> Authored: Tue Mar 18 14:56:43 2014 -0400 Committer: Daniel Kulp <[email protected]> Committed: Tue Mar 18 14:59:19 2014 -0400 ---------------------------------------------------------------------- .../apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/49192409/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 8f95018..b4a2ae7 100644 --- 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 @@ -264,6 +264,8 @@ public class AsyncHTTPConduit extends URLConnectionHTTPConduit { int bufSize = csPolicy.getChunkLength() > 0 ? csPolicy.getChunkLength() : 16320; inbuf = new SharedInputBuffer(bufSize, allocator); outbuf = new SharedOutputBuffer(bufSize, allocator); + isAsync = outMessage != null && outMessage.getExchange() != null + && !outMessage.getExchange().isSynchronous(); } public boolean retransmitable() { @@ -770,7 +772,8 @@ public class AsyncHTTPConduit extends URLConnectionHTTPConduit { protected void setupNewConnection(String newURL) throws IOException { httpResponse = null; - isAsync = false; + isAsync = outMessage != null && outMessage.getExchange() != null + && !outMessage.getExchange().isSynchronous(); exception = null; connectionFuture = null; session = null;
