Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-20726

QNetworkAccessManager connection cache timeout should be configurable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 6.3.0 Alpha
    • 4.7.3
    • Network
    • None
    • 85cfbae1d62617fdc452680813f993e812bb55dd (qt/qtbase/dev)

      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.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            jupakari Juuso Pakarinen
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes