Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.1
-
None
-
Fedora 28 / Firefox 63.0.3
emsdk-1.38.21-64bit
-
-
a9cd8ce2961190e51c59cdd34c26c5b6f4c70aa1
Description
I applied the fix from https://bugreports.qt.io/browse/QTBUG-72516 to my Qt 5.12.0 source manually(Without it finished is not emitted).
The attached example makes an http request to "http://urlecho.appspot.com:81/echo" on clicking "Go" with a 3 seconds timeout that calls abort.
Since the request can not work for port 81 the timeout should always trigger.
The signal finished is emitted but QNetworkReply::error() does not return the expected OperationCanceledError.
In the following image you can see what happens in the attached example on Linux:
And Webassembly:
I fixed it for myself like this:
// qtbase/src/network/access/qnetworkreplywasmimpl.cpp void QNetworkReplyWasmImpl::abort() { Q_D(const QNetworkReplyWasmImpl); d->doAbort(); setError( QNetworkReply::OperationCanceledError, "Operation canceled" ); // Fixed it for me close(); }