Skip to content

Commit

Permalink
[Client] Deduplicate error log for SSLException (apache#3320)
Browse files Browse the repository at this point in the history
### Motivation

While testing apache#3310, I noticed that the `PerChannelBookieClient#exceptionCaught` logic contains redundant logs when the exception is an `SSLException`. This PR removes a redundant log from client.

Based on reading through the rest of the method, this should be a trivial change with no other side effects. My one question is how closing a channel and closing the context differ. Technically, returning early skips the `ctx.close()`, which could change the behavior.

### Changes

* Return early to prevent a redundant log

(cherry picked from commit bd82797)
(cherry picked from commit e3091df)
  • Loading branch information
michaeljmarshall authored and nicoloboschi committed Jan 11, 2023
1 parent 1fe1954 commit 0fd77da
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws E
if (c != null) {
closeChannel(c);
}
return;
}

if (cause instanceof IOException) {
Expand Down

0 comments on commit 0fd77da

Please sign in to comment.