Skip to content

Commit

Permalink
Tone down some exceptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
msqr committed Aug 16, 2023
1 parent 114c70a commit 14e1dfa
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import static net.solarnetwork.central.net.proxy.service.impl.NettyDynamicProxyServer.SSL_SESSION_PROXY_SETTINGS_KEY;
import java.io.IOException;
import javax.net.ssl.SSLException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import io.netty.bootstrap.Bootstrap;
Expand Down Expand Up @@ -165,6 +166,8 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
msg = msg.substring(0, max) + "... and " +(msg.length() - max) +" more";
}
log.debug("Non-TLS client message; dropping connection: {}", msg);
} else if ( root instanceof SSLException || root.getClass().getName().startsWith("javax.crypto.") ) {
log.debug("TLS client error; dropping connection: {}", root.toString());
} else if ( root instanceof IOException e) {
log.debug("Client IO error; dropping connection: {}", e.toString());
} else {
Expand Down

0 comments on commit 14e1dfa

Please sign in to comment.