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

App started without internet doesn't gain it when it's available

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 5.15.0
    • Network
    • None
    • macOS, Windows

    Description

      Steps to reproduce:

      1. Turn off Wi-Fi.
      2. Start the attached app.
      3. `QNetworkReply::UnknownNetworkError` errors start flowing in.
      4. Turn Wi-Fi back on.
      5. All subsequent requests still fail with `QNetworkReply::UnknownNetworkError`, network connectivity is never regained.

      This problem occurs for `QNetworkAccessManager` instances created during network unavailability. It does not occur on Linux.

      It's very similar to QTBUG-49760, the only difference is that we disable the network prior to starting the app (compared to doing so while it's running).

      Workarounds we found:

      • using deprecated `nam.setNetworkAccessible(QNetworkAccessManager::Accessible)` yields `QNetworkReply::HostNotFoundError` errors instead and successes to complete requests once network is regained,
      • don't cache `QNetworkAccessManager` instance.

      Attachments

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

        Activity

          People

            tpochep Timur Pocheptsov
            eck Krzysztof Potrzasaj
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes