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

Signal finishedWithError from QHttpNetworkReply not connected to QNetworkAccessHttpBackend.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.8.3, 5.0.0 Beta 1
    • 4.7.4, 4.8.1, 5.0.0
    • Network
    • None
    • 3976339ca9b12c7eddbc69ed3a31f85ce845ba63 (5.0), 56cd31405241e81633ed6ae64b8f58c840b9a058 (4.8)

    Description

      When using a QNetworkAccessManager instance across q_event_loop.exec() the errors emitted from the QHttpNetworkReply object are not getting received from the QNetworkAccessHttpBackend object.

      I debugged it as best as I could. As far as I can tell the QHttpNetworkReply object is not connected via the signal finishedWithError to QNetworkAccessHttpBackend.

      I've attached a simple example of the issue which reliable reproduces the error. This issue might be related to how I'm provoking the network error, I'm subclassing an IODevice which returns -1 when it's read from. I discovered this issue when I was unit testing for the condition of a http file post, when the source file drive goes offline.

      Additional odd behavior.
      1. If the first net request returns an error on the first call to q_event_loop.(), then the second time when the net request returns an error then q_event_loop.exec() will return correctly. However if the first request returns successfully then the second time it won't return correctly.

      Attachments

        Issue Links

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

          Activity

            People

              shkearns Shane Kearns
              gosuperninja Tyler Conant
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes