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;
|
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::readyRead, this, &SslServer::onSocketReadyRead);
|
||||||
connect(sslSocket, &QSslSocket::disconnected, this, &SslServer::onClientDisconnected);
|
connect(sslSocket, &QSslSocket::disconnected, this, &SslServer::onClientDisconnected);
|
||||||
typedef void (QSslSocket:: *sslErrorsSignal)(const QList<QSslError> &);
|
typedef void (QSslSocket:: *sslErrorsSignal)(const QList<QSslError> &);
|
||||||
@ -232,6 +232,7 @@ void SslServer::incomingConnection(qintptr socketDescriptor)
|
|||||||
}
|
}
|
||||||
if (m_sslEnabled) {
|
if (m_sslEnabled) {
|
||||||
qCDebug(dcTcpServer()) << "Starting SSL encryption";
|
qCDebug(dcTcpServer()) << "Starting SSL encryption";
|
||||||
|
addPendingConnection(sslSocket);
|
||||||
sslSocket->setSslConfiguration(m_config);
|
sslSocket->setSslConfiguration(m_config);
|
||||||
sslSocket->startServerEncryption();
|
sslSocket->startServerEncryption();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user