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


##########
rt/transports/http/src/main/java/org/apache/cxf/transport/http/HttpClientHTTPConduit.java:
##########
@@ -1161,22 +1161,21 @@ public CompletableFuture<HttpResponse<InputStream>> 
run() throws IOException {
                 future = cl.sendAsync(request, handler);
             }
             future.exceptionally(ex -> {
-                // Record the failure on the message so the close() invoked 
below
-                // does not treat this as an un-sent request and resend it: the
-                // shared WrappedOutputStream#close() already skips
-                // handleHeadersTrustCaching() once outMessage carries an 
Exception
-                // (CXF-9250).
-                outMessage.setContent(Exception.class,
-                        ex instanceof Exception ? (Exception) ex : new 
IOException(ex));
-                if (pout != null) {
-                    synchronized (pout) {
-                        pout.notifyAll();
+                // Only release a writer waiting for the connection or blocked 
on the body. The

Review Comment:
   > `exception`: it was never set. git log -S only finds it in the commit that 
introduced the conduit. It's declared and checked in handleNoOutput(), 
setupWrappedStream() and thresholdReached(), but nothing assigns it, also 
before this PR. I left it alone to keep this change focused, but I'm happy to 
remove the dead field in a separate cleanup.
   
   It was set before, but the change predates this pull request, I am wondering 
if we should set it explicitly in the `exceptionally()` callback? But you are 
right `future.get()` will capture the exception eventually.



-- 
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