public static boolean isConnectTimedOut(Throwable t) {
        if (t instanceof SocketTimeoutException || t instanceof TimeoutException) {
            String msg = t.getMessage();
            return msg != null && msg.toLowerCase().contains(MSG_CONNECT_TIMED_OUT);
        }

        return false;
    }
Checks if the given exception represents connection timeout error.

@param t exception
@return true if the exception represents connection timeout error; false
        otherwise
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseException.java