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

QNetworkReply may leak if host cannot be resolved

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.1.0 Beta 1, 5.1.1, 5.2.0
    • Network
    • None
    • OSX 10.8.4, Android 4.2.2.
    • macOS

    Description

      When performing several consequent HTTP request to a nonexistent host, only the first one will be finished and other requests will be leaked.

      Steps to reproduce:
      1. Send an HTTP request to a nonexistent host.
      2. Connect to QNetworkReply::finished signal.
      3. Repeat these steps two or more times in a row.

      Expected Result:
      QNetworkReply::finished signal is emitted for every request made.

      Actual Result:
      QNetworkReply::finished signal is emitted only for the first requests. All other QNetworkReply objects are leaked. If one more request is made after a certain delay, it will be leaked, while the first of previously leaked requests will be finished.

      References:
      1. test.zip - a sample that can be used to reproduce the bug.
      2. fix_qnetworkreply_leak.patch - a patch that fixes the bug.

      Attachments

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

        Activity

          People

            shkearns Shane Kearns
            michael.rozumyanskiy@gmail.com Michael Rozumyanskiy
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes