reta commented on code in PR #3673:
URL: https://github.com/apache/cxf/pull/3673#discussion_r4503145867


##########
rt/transports/http/src/main/java/org/apache/cxf/transport/http/HttpClientHTTPConduit.java:
##########
@@ -470,10 +584,16 @@ protected void setupConnection(Message message, Address 
address, HTTPClientPolic
             initializationLock.lock();
             try {
                 cl = clientRef;
+                if (cl == null && !httpsReset) {
+                    // switching back to the settings of a client this conduit 
has used before
+                    cl = takeDeferredClient(clientPolicy, 
clientParametersCopy);

Review Comment:
   Thanks @ffang , I am concerned about the complexity that we are introducing 
with `reusableClientRefs` now, it is very difficult to understand what is going 
on (it was difficult even before), I think it is not justified for 2 reasons:
      - we are covering pretty narrow case when policy changes (majority of 
usages do not do that)
      - creating a new client (and letting the differed ones to be released) 
looks very straightforward, right?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to