From ad78a13303a7fdb489a2582e0d2b0ea0fe29e23e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Thu, 5 Aug 2021 13:48:32 +0200 Subject: [PATCH 1/2] Make use of addPendingConnection in order to keept the incomming connection mechanism working --- libnymea-core/servers/tcpserver.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libnymea-core/servers/tcpserver.cpp b/libnymea-core/servers/tcpserver.cpp index 3bf337b3..a292a769 100644 --- a/libnymea-core/servers/tcpserver.cpp +++ b/libnymea-core/servers/tcpserver.cpp @@ -214,7 +214,7 @@ void SslServer::incomingConnection(qintptr socketDescriptor) qCDebug(dcTcpServer()) << "New client socket connection:" << sslSocket; - connect(sslSocket, &QSslSocket::encrypted, [this, sslSocket](){ emit clientConnected(sslSocket); }); + connect(sslSocket, &QSslSocket::encrypted, this, [this, sslSocket](){ emit clientConnected(sslSocket); }); connect(sslSocket, &QSslSocket::readyRead, this, &SslServer::onSocketReadyRead); connect(sslSocket, &QSslSocket::disconnected, this, &SslServer::onClientDisconnected); typedef void (QSslSocket:: *sslErrorsSignal)(const QList &); @@ -232,6 +232,7 @@ void SslServer::incomingConnection(qintptr socketDescriptor) } if (m_sslEnabled) { qCDebug(dcTcpServer()) << "Starting SSL encryption"; + addPendingConnection(sslSocket); sslSocket->setSslConfiguration(m_config); sslSocket->startServerEncryption(); } else { From df42273ed11f77e162bded53f413c016cf3da607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 9 Aug 2021 16:28:35 +0200 Subject: [PATCH 2/2] Undo add pending connection --- libnymea-core/servers/tcpserver.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/libnymea-core/servers/tcpserver.cpp b/libnymea-core/servers/tcpserver.cpp index a292a769..48b2a937 100644 --- a/libnymea-core/servers/tcpserver.cpp +++ b/libnymea-core/servers/tcpserver.cpp @@ -232,7 +232,6 @@ void SslServer::incomingConnection(qintptr socketDescriptor) } if (m_sslEnabled) { qCDebug(dcTcpServer()) << "Starting SSL encryption"; - addPendingConnection(sslSocket); sslSocket->setSslConfiguration(m_config); sslSocket->startServerEncryption(); } else {