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

QNetworkAccessManager connection cache timeout should be configurable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.3.0 Alpha
    • 4.7.3
    • Network
    • 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

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes