diff -r 90cf07c60feb -r e088bd03812d QTfrontend/net/newnetclient.cpp --- a/QTfrontend/net/newnetclient.cpp Wed May 01 00:01:56 2019 +0300 +++ b/QTfrontend/net/newnetclient.cpp Wed May 01 00:29:46 2019 +0300 @@ -85,7 +85,18 @@ netClientState = Connecting; mynick = nick; myhost = hostName + QString(":%1").arg(port); - NetSocket.connectToHost(hostName, port); + if (useTls) + { + NetSocket.connectToHostEncrypted(hostName, port); + if (!NetSocket.waitForEncrypted()) + { + qWarning("Handshake failed"); + } + } + else + { + NetSocket.connectToHost(hostName, port); + } } void HWNewNet::Disconnect()