Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.4, 4.8.1, 5.0.0
-
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
- relates to
-
QTBUG-24680 QHttpPart hangs reading from a QIODevice at pos() != 0
- Open