From 1995b5ea591fd5db442eee4321913ec612eabf17 Mon Sep 17 00:00:00 2001 From: Sheldon Shao Date: Mon, 13 May 2024 00:14:55 -0700 Subject: [PATCH] HttpExchange/HttpRequest got retained by HttpSenderOverHTTP (#11782) --- .../org/eclipse/jetty/client/http/HttpSenderOverHTTP.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpSenderOverHTTP.java b/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpSenderOverHTTP.java index af502abf683..30e0b4e1d43 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpSenderOverHTTP.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpSenderOverHTTP.java @@ -39,7 +39,6 @@ public class HttpSenderOverHTTP extends HttpSender private final IteratingCallback headersCallback = new HeadersCallback(); private final IteratingCallback contentCallback = new ContentCallback(); private final HttpGenerator generator = new HttpGenerator(); - private HttpExchange exchange; private MetaData.Request metaData; private ByteBuffer contentBuffer; private boolean lastContent; @@ -62,7 +61,6 @@ public class HttpSenderOverHTTP extends HttpSender { try { - this.exchange = exchange; this.contentBuffer = contentBuffer; this.lastContent = lastContent; this.callback = callback; @@ -91,7 +89,6 @@ public class HttpSenderOverHTTP extends HttpSender { try { - this.exchange = exchange; this.contentBuffer = contentBuffer; this.lastContent = lastContent; this.callback = callback; @@ -157,6 +154,7 @@ public class HttpSenderOverHTTP extends HttpSender protected Action process() throws Exception { HttpClient httpClient = getHttpChannel().getHttpDestination().getHttpClient(); + HttpExchange exchange = getHttpExchange(); ByteBufferPool byteBufferPool = httpClient.getByteBufferPool(); boolean useDirectByteBuffers = httpClient.isUseOutputDirectByteBuffers(); while (true)