Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
5.13.0 RC 3
-
None
-
Qt Creator 4.9.1, Qt5.13.0
Description
Same implementation file, Classes created by multiple threads will fail.
bytesAvailable return 0
Use the entire class for TLS validation, my code client.
connect(&server, SIGNAL(connected()), this, SLOT(connectedToHost()));
connect(&server, SIGNAL(disconnected()), this, SLOT(serverDisconnect()));
connect(&server, SIGNAL(readyRead()), this, SLOT(readData()));
connect(&server, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(sslErrors(QList<QSslError>)));
server.setPrivateKey("certificates/client.key");
server.setLocalCertificate("certificates/client.crt"); server.setPeerVerifyMode(QSslSocket::VerifyNone); server.setProtocol(QSsl::TlsV1_2);
The ReadyRead error code cannot be received, the Success code can be received, and other signals can be received in both codes.
Wireshark receives a message packet from the server.
-----------------------------------------------------
error code:
QCoreApplication a(argc, argv);
QtConcurrent::run([](){ Link link; link.connectToServer(); QThread::sleep(3); });
return a.exec();
success code:
QCoreApplication a(argc, argv); Link link; link.connectToServer(); return a.exec();