Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
None
-
5.15.0
-
None
Description
Steps to reproduce:
- Turn off Wi-Fi.
- Start the attached app.
- `QNetworkReply::UnknownNetworkError` errors start flowing in.
- Turn Wi-Fi back on.
- All subsequent requests still fail with `QNetworkReply::UnknownNetworkError`, network connectivity is never regained.
This problem occurs for `QNetworkAccessManager` instances created during network unavailability. It does not occur on Linux.
It's very similar to QTBUG-49760, the only difference is that we disable the network prior to starting the app (compared to doing so while it's running).
Workarounds we found:
- using deprecated `nam.setNetworkAccessible(QNetworkAccessManager::Accessible)` yields `QNetworkReply::HostNotFoundError` errors instead and successes to complete requests once network is regained,
- don't cache `QNetworkAccessManager` instance.