**Describe the unexpected behaviour**
On connection with server having self-signed certificate warning message and acceptance request issued twice.

**How to reproduce**
Provide server with self-signed certificate and make a secure connection.

**Expected behavior**
Only one warning message and acceptance request should be issued.

**Error message and/or stacktrace**
```
ubuntu@ip-172-31-42-195:~/ClickHouse-comb/build_debug/programs$ ./clickhouse-client -s --port 9541
ClickHouse client version 22.9.1.1.
Connecting to localhost:9541 as user default.

WARNING: Certificate verification failed
----------------------------------------
Issuer Name:  /CN=another
Subject Name: /CN=another

The certificate yielded the error: self signed certificate

The error occurred in the certificate chain at position 0
Accept the certificate (y,n)? y
Connected to ClickHouse server version 22.9.1 revision 54460.

Warnings:
 * Server was built in debug mode. It will work slowly.

ip-172-31-42-195.us-east-2.compute.internal :)
WARNING: Certificate verification failed
----------------------------------------
Issuer Name:  /CN=another
Subject Name: /CN=another

The certificate yielded the error: self signed certificate

The error occurred in the certificate chain at position 0
Accept the certificate (y,n)?
```
{
    String server_name;
    UInt64 server_version_major = 0;
    UInt64 server_version_minor = 0;
    UInt64 server_version_patch = 0;
    if (hosts_and_ports.empty())
    {
        String host = config().getString("host", "localhost");
        UInt16 port = ConnectionParameters::getPortFromConfig(config());
        hosts_and_ports.emplace_back(HostAndPort{host, port});
    }
    for (size_t attempted_address_index = 0; attempted_address_index < hosts_and_ports.size(); ++attempted_address_index)
    {
        try
        {
            connection_parameters = ConnectionParameters(
                config(), hosts_and_ports[attempted_address_index].host, hosts_and_ports[attempted_address_index].port);
            if (is_interactive)
                std::cout << "Connecting to "
                          << (!connection_parameters.default_database.empty() ? "database " + connection_parameters.default_database + " at "
                                                                              : "")
                          << connection_parameters.host << ":" << connection_parameters.port
                          << (!connection_parameters.user.empty() ? " as user " + connection_parameters.user : "") << "." << std::endl;
            connection = Connection::createConnection(connection_parameters, global_context);
            if (max_client_network_bandwidth)