Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 5aa988b13 -> f2bd28eb3
[CXF-7112,CXF-7109] Make sure to remove ClientCallback from exchange when invoking handleException() (cherry picked from commit 1d67c14d413c0ead5daa3ac5d1a0e5e8ad3145ec) Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/f2bd28eb Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f2bd28eb Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f2bd28eb Branch: refs/heads/3.1.x-fixes Commit: f2bd28eb34812b6d08c3cfd4b9b38ba24be0716f Parents: 5aa988b Author: Tadayoshi Sato <[email protected]> Authored: Sun Oct 30 17:07:40 2016 +0900 Committer: Freeman Fang <[email protected]> Committed: Sun Oct 30 22:16:34 2016 +0800 ---------------------------------------------------------------------- .../apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/f2bd28eb/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 bada797..0ebcb81 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 @@ -872,7 +872,8 @@ public class AsyncHTTPConduit extends URLConnectionHTTPConduit { } Exchange exchange = outMessage.getExchange(); - ClientCallback cc = exchange.get(ClientCallback.class); + // remove callback so that it won't be invoked twice + ClientCallback cc = exchange.remove(ClientCallback.class); if (cc != null) { cc.handleException(null, new SocketTimeoutException()); }
