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

QNetworkAccessManager::finished and QNetworkReply::finished not called if network becomes inaccessible

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.6.1
    • Network
    • None

    Description

      It is occurs on my MacBook pro, but looks like platform-independent error.

      1. Create QNetworkAccessManager

      QNetworkAccessManager networkManager;
      

      2. connect to it signal "finished":

      connect(&networkManager, &QNetworkAccessManager::finished, [](QNetworkReply *reply) {
          qDebug() << "got reply: " << reply;
      });
      

      now start downloading some large file

      QNetworkReply *reply = networkManager->get(QNetworkRequest(QUrl("http://master.qt.io/archive/qt/5.2/5.2.1/single/qt-everywhere-opensource-src-5.2.1.zip)));
      connect(reply, &QNetworkReply::finished, [](){ qDebug() << "current reply finished too!"; };
      

      and while it downloading - disable wifi connection on your laptop

      expected result: you get finished signal with an error.
      actual result: you don't receive finished signal;

      Attachments

        Activity

          People

            cnn Qt Core & Network
            ctin Konstantin
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated: