ARTEMIS-3676 ignore NoRouteToHostException

This kind of exception can be common in cloud environments and should be
ignored for logging just like ConnectException.
This commit is contained in:
Justin Bertram 2022-03-18 14:28:39 -05:00 committed by clebertsuconic
parent d0c550bcd7
commit 842ac1df5d
1 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@ import java.io.IOException;
import java.net.ConnectException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.NoRouteToHostException;
import java.net.SocketAddress;
import java.net.URI;
import java.net.URISyntaxException;
@ -951,7 +952,7 @@ public class NettyConnector extends AbstractConnector {
} else {
Throwable t = future.cause();
if (t != null && !(t instanceof ConnectException)) {
if (t != null && !(t instanceof ConnectException) && !(t instanceof NoRouteToHostException)) {
ActiveMQClientLogger.LOGGER.errorCreatingNettyConnection(future.cause());
}