**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)?
```
{
                ThrottlerPtr throttler = std::make_shared<Throttler>(max_client_network_bandwidth, 0, "");
                connection->setThrottler(throttler);
            }
            connection->getServerVersion(
                connection_parameters.timeouts, server_name, server_version_major, server_version_minor, server_version_patch, server_revision);
            config().setString("host", connection_parameters.host);
            config().setInt("port", connection_parameters.port);
            break;
        }
        catch (const Exception & e)
        {
            
            
            if ((connection_parameters.user.empty() || connection_parameters.user == "default")
                && e.code() == DB::ErrorCodes::AUTHENTICATION_FAILED)
            {
                std::cerr << std::endl
                          << "If you have installed ClickHouse and forgot password you can reset it in the configuration file." << std::endl
                          << "The password for default user is typically located at /etc/clickhouse-server/users.d/default-password.xml" << std::endl
                          << "and deleting this file will reset the password." << std::endl
                          << "See also /etc/clickhouse-server/users.xml on the server where ClickHouse is installed." << std::endl
                          << std::endl;
                throw;
            }
            else
            {
                if (attempted_address_index == hosts_and_ports.size() - 1)
                    throw;
                if (is_interactive)