Make use of addPendingConnection in order to keept the incomming connection mechanism working
This commit is contained in:
parent
67b097f2fe
commit
ad78a13303
@ -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<QSslError> &);
|
||||
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user