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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Invalid
    • Affects Version/s: 5.5.1
    • Fix Version/s: None
    • Component/s: Network: HTTP
    • Labels:
      None
    • Environment:
      Tested with ubuntu 16.04
    • Platform/s:
      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

            Assignee:
            manordheim MÃ¥rten Nordheim
            Reporter:
            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