You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2026/05/18 05:58:34 UTC
(pulsar) branch branch-4.2 updated: [fix][proxy] Close channel on connection failure (#25770)
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-4.2 by this push:
new d88c6f40349 [fix][proxy] Close channel on connection failure (#25770)
d88c6f40349 is described below
commit d88c6f403499c998c0ed36e0236f8a98d8640b3e
Author: Zixuan Liu <no...@gmail.com>
AuthorDate: Thu May 14 15:21:16 2026 +0800
[fix][proxy] Close channel on connection failure (#25770)
(cherry picked from commit 35cf8f1fab754073105199269044e64de67cc732)
---
.../main/java/org/apache/pulsar/proxy/server/DirectProxyHandler.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/DirectProxyHandler.java b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/DirectProxyHandler.java
index f707abbc06a..773cbc5fbcd 100644
--- a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/DirectProxyHandler.java
+++ b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/DirectProxyHandler.java
@@ -194,6 +194,10 @@ public class DirectProxyHandler {
// Close the connection if the connection attempt has failed.
log.warn("[{}] Establishing connection to {} ({}) failed. Closing inbound channel.", inboundChannel,
targetBrokerAddress, brokerHostAndPort, future.cause());
+ Channel channel = f.channel();
+ if (channel != null) {
+ channel.close();
+ }
inboundChannel.close();
}
});