Skip to content

Commit

Permalink
Merge #2140 into main
Browse files Browse the repository at this point in the history
  • Loading branch information
violetagg committed Apr 4, 2022
2 parents cfa3aab + 34837af commit 9ad339b
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import io.netty.handler.codec.http.HttpMethod;
import io.netty.handler.codec.http.HttpUtil;
import io.netty.handler.codec.http.HttpVersion;
import io.netty.handler.ssl.SslClosedEngineException;
import io.netty.resolver.AddressResolverGroup;
import io.netty.util.AsciiString;
import io.netty.util.AttributeKey;
Expand Down Expand Up @@ -382,6 +383,16 @@ else if (handler.shouldRetry && AbortedException.isConnectionReset(error)) {
}
}
}
else if (error instanceof SslClosedEngineException) {
if (log.isWarnEnabled()) {
log.warn(format(connection.channel(), "The connection observed an error"), error);
}
HttpClientOperations ops = connection.as(HttpClientOperations.class);
if (ops != null) {
// javax.net.ssl.SSLEngine has been closed, do not return the connection to the pool
ops.markPersistent(false);
}
}
else if (log.isWarnEnabled()) {
log.warn(format(connection.channel(), "The connection observed an error"), error);
}
Expand Down

0 comments on commit 9ad339b

Please sign in to comment.