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

QNetworkAccessManager leaves the network connection open after HTTP request is finished

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.8.x
    • 4.7.0
    • None
    • Qt 4.7.0 for S^3. Tested on N8

    Description

      Underlying Symbian network interface is not closed after QNetworkRequest has finished. This is easy to notice because 3G connection icon stays active after the request. This is especially problematic on apps accessing network rarely. It leaves impression to end user that connection is active all the time.

      Probably connection shouldn't be closed immediately after the request because new request might follow quickly. But it seems that now the connection is never closed. Even after deleting both QNetworkRequest and QNetworkAccessManager objects connection seems to stay open.

      Problem is easy to reproduce with a following snippet:

      manager = new QNetworkAccessManager(this);
      request = new QNetworkRequest(QUrl("http://www.google.com"));
      connect(manager, SIGNAL(finished(QNetworkReply*)),
              this, SLOT(replyFinished(QNetworkReply*)));
      manager->get(*request);
      
      void replyFinished(QNetworkReply* reply)
      {
      reply->deleteLater();
      }
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-15812
          # Subject Branch Project Status CR V

          Activity

            People

              shkearns Shane Kearns
              juhanak Juhana Koski
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: