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

Network connection never established when offline at launch

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.15.0
    • Fix Version/s: 5.15.1
    • Component/s: Network: HTTP
    • Labels:
      None
    • Platform/s:
      Windows

      Description

      When offline at launch, QNetworkAccessManager::Get will continually return QDisabledNetworkReply pointers even after connection is established... unless you apply some magic sauce: QNetworkAccessManager::networkAccessible.

      Calling that getter will trigger something behind the scenes allowing for requests to go through.

      I attached a sample console project that demonstrates the issue in case it helps.

      Steps to reproduce:

      1. Disable all network connections
      2. Run the project
      3. Watch errors in the console
      4. Enable a network connection
      5. Errors continue

      Remove the commented out magic sauce and retry. In step 5 the calls will start to succeed.

        Attachments

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

          Activity

            People

            Assignee:
            manordheim MÃ¥rten Nordheim
            Reporter:
            hyldegaard Mads Hyldegaard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes