Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-91408

QSslSocket can not receive readyRead single

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 5.13.0 RC 3
    • Network: Sockets
    • 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();

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            wang1 wang wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes