Details
Description
I have problems with QNetworkAccessManager on both macOS and iOS.
After disabling network access (i.e. turning wifi off) and re-enabling it after some time (20-30 seconds) the QNetworkAccessManager will not get network access at all.
It happens quite often if the time when the network access is really down is longer.
I think the problem itself might be in QNetworkConfigurationManager, as sometimes during turning wifi off I see log
QObject::disconnect: Unexpected null parameter and shortly after that all request will fail, even if "the real access" is back.
I think it's serious bug, as the only working workaround someone told me is to recreate QNetworkConfigurationManager instance(s) - I can do it for my own instances, but what about QML ones? I know about QDeclarativeNetworkAccessManagerFactory, but I don;t think there's a way to force re-creating all QML QNetworkConfigurationManager instances.
EDIT:
I've added minimal example project and example output (app was started with WIFI off).
EDIT2:
I found a workaround - in such case calling setNetworkAccessible(QNetworkAccessManager::Accessible); brings QNAM back to living world.
Attachments
Issue Links
- is duplicated by
-
QTBUG-55180 QNetworkAccessManager shows "Network access is disabled."
- Closed