Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
5.2.1
-
None
-
linux x64
Description
I am making a url request, using QNetworkAccessManager's get() method.
If i call networkaccessmanager->get() and then do abort() on the returned reply, sometimes QNetworkReply's signal finished() gets invoked (sometimes not), and error() always gets called. Both finished() and error() always have error code 5 ("Network Operation cancelled").
See attached main.cpp (builds out-of-box, you just have to add network module to the .pro file).
As you can see I am doing 4 GET requests in a row, then abort() all the requests, but i am getting finished() slot invoked only 3 times, and error() slot gets invoked 4 times
finished() doesnt get invoked for the first GET url request.
This can lead to a memory leak - since developers usually deleteLater() the QNetworkReply in the finished() slot, and this way some objects do not get deleted.