TimeOut Conexão Android e SQL Server usando JDBC/JTDS

Gostaria de limitar um tempo para a conexão. Toda vez que ela não encontra o Host para conectar, ela fica tentando e demora.

Eis o código:

@SuppressLint("NewApi")
    public Connection CONN() {

        /*Properties props = new Properties();
        props.setProperty("user", "dbuser");
        props.setProperty("password", "dbpassword");
        props.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_NET_CONNECT_TIMEOUT, "2000");*/

        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()
                .permitAll().build();
        StrictMode.setThreadPolicy(policy);
        Connection conn = null;
        String ConnURL = null;
        try {
            Class.forName(classs);
            ConnURL = "jdbc:jtds:sqlserver://" + ip + ";"
                    + "databaseName=" + db + ";user=" + un + ";password="
                    + password + ";namedPipe=true;loginTimeout=5;socketTimeout=1";

        /*Properties properties = new Properties();
        properties.put("connectTimeout", "2000");*/
            DriverManager.setLoginTimeout(5);
            conn = DriverManager.getConnection(ConnURL);
        } catch (SQLException se) {
            Log.e("ERRO", se.getMessage());
        } catch (ClassNotFoundException e) {
            Log.e("ERRO", e.getMessage());
        } catch (Exception e) {
            Log.e("ERRO", e.getMessage());
        }
        return conn;
    }