Skip to content

Commit 67eb0fb

Browse files
[cleanup][proxy] ProxyConnection should not call super.exceptionCaught (#19990)
### Motivation While debugging an issue, I noticed that we call `super.exceptionCaught(ctx, cause);` in the `ProxyConnection` class. This leads to the following log line: > An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception. io.netty.channel.unix.Errors$NativeIoException: recvAddress(..) failed: Connection reset by peer Because we always handle exceptions, there is no need to forward them to the next handler. ### Modifications * Remove a single method call ### Verifying this change This is a trivial change. Note that we do not call the super method in any other handler implementations in the project. ### Documentation - [x] `doc-not-needed` <!-- Your PR changes do not impact docs --> ### Matching PR in forked repository PR in forked repository: skipping PR for this trivial change
1 parent 2dcaf0e commit 67eb0fb

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ public synchronized void channelInactive(ChannelHandlerContext ctx) throws Excep
208208

209209
@Override
210210
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
211-
super.exceptionCaught(ctx, cause);
212211
LOG.warn("[{}] Got exception {} : Message: {} State: {}", remoteAddress, cause.getClass().getSimpleName(),
213212
cause.getMessage(), state,
214213
ClientCnx.isKnownException(cause) ? null : cause);

0 commit comments

Comments
 (0)