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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.6.1
    • Fix Version/s: None
    • Component/s: Network
    • Labels:
      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

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

          Activity

            People

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

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes