From d6dfbfa6cf00b325e4016dca108fbdce52e14471 Mon Sep 17 00:00:00 2001 From: Sergei Ilinykh Date: Fri, 24 May 2024 17:10:11 +0300 Subject: [PATCH] Don't accidently recet use-ssl if set outside --- src/xmpp/xmpp-core/connector.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xmpp/xmpp-core/connector.cpp b/src/xmpp/xmpp-core/connector.cpp index aea6a8b8..56b0ed2b 100644 --- a/src/xmpp/xmpp-core/connector.cpp +++ b/src/xmpp/xmpp-core/connector.cpp @@ -328,7 +328,9 @@ void AdvancedConnector::connectToServer(const QString &server) #endif connect(s, &BSocket::connected, this, [this, s]() { - setUseSSL(s->service() == QLatin1String(XMPP_CLIENT_TLS_SRV)); + if (!useSSL()) { + setUseSSL(s->service() == QLatin1String(XMPP_CLIENT_TLS_SRV)); + } bs_connected(); }); connect(s, SIGNAL(error(int)), SLOT(bs_error(int)));