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

abort for QNetworkReply post request with data doesn't close connection

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 5.5.1
    • Network: HTTP
    • None
    • Tested with ubuntu 16.04
    • Linux/X11

    Description

      I create post requests with some data to send requests and sometimes I abort them very fast. This leads to situation when requests are stuck in QNetworkAccessManager. So only first 6 requests are sent... Requests from 7 and later are not sent.

          networkManager = new QNetworkAccessManager(this);
          for (size_t i = 0; i < 20; ++i)
          {
              QByteArray postData("S");
              QNetworkReply * reply = networkManager->post(QNetworkRequest(QUrl("http://127.0.0.1:8080/layers")), postData);
              reply->abort();
              reply->deleteLater(); //should be called in finish slot, but
                                    // in fact finish slot is called in abort.
                                    // So I simplify this for minimal sample
          }
      

      Attachments

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

        Activity

          People

            manordheim MÃ¥rten Nordheim
            whitespacer Roman Silakov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes