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

Requests to unreachable addresses before clients can connect to QNetworkReply::finish()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.2
    • Some future release
    • Network
    • None
    • b498c15ebbf120819f73fe761388fd63c2de4b23, b44ca15776227c8d04e88e1c343a87fd6c54fee0

    Description

      In:

      QNetworkRequest request;
      request.setUrl(QUrl("http://255.255.255.255"));
      QNetworkReply *reply = manager->get(request);
      connect(reply, SIGNAL(finished()), SLOT(finished()));
      

      the finished() signal has fired before we can connect to it.

      Clients need to do:

      QNetworkRequest request;
      request.setUrl(QUrl("http://255.255.255.255"));
      QNetworkReply *reply = manager->get(request);
      if (reply->error())
          return;
      connect(reply, SIGNAL(finished()), SLOT(finished()));
      

      Update docs and add a test to tst_qnetworkreply.

      Attachments

        Issue Links

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

          Activity

            People

              mgoetz Markus Goetz (Inactive)
              robert@roberthogan.net Robert Hogan
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes