Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.3
-
None
-
85cfbae1d62617fdc452680813f993e812bb55dd (qt/qtbase/dev)
Description
An application using QNetworkAccessManager has no visibility to the underlying
TCP connections, and cannot control when they are closed. The connection cache
purges the connections using a hard-coded 120 second timeout. In mobile use
this is long enough to allow the radios to shut down, and the radios need to be
powered up just for sending the FIN packets to close the expired connection,
which is quite bad for battery lifetime.
The current workaround is to delete the
QNetworkAccessManager object, which causes an immediate purge of its cached
connections, allowing the connections to be closed before the radios shut down.
A cleaner solution would be the possibility to configure the connection cache
timeout, or an API to force closing of the connections.
This is not an urgent issue as there is a functional workaround for Harmattan
bundled software. But since the QNAM API is very convenient, third party
developers are likely to encounter this, most likely causing unnecessarily
negative use-time behavior with their apps.
Attachments
Issue Links
- is required for
-
QTBUG-20851 QNetworkSession::close() can't close connection established by QNetworkAccessManager::get()
-
- Closed
-
- relates to
-
QTBUG-25280 QNetworkAccessManager concurrent request limit not configurable
-
- Closed
-