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

QNetworkAccessManager fails to make requests to 127.0.0.1 when Wifi connection drops

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.9.2
    • 5.7.1
    • Network
    • None
    • Windows 10 64bit
    • eb2b635154c5b57f80abebd50e2ec344de0b8be4

      I use QNetworkAccessManager to make HTTP requests to a URL on localhost. The problem arises when the program is started with WiFi enabled (and being connected to a WiFi network), and then the connection drops (for example by disabling WiFi).

      The NetworkAccessibility changes to "not accessible" (this might be ok because there is no external network connection anymore), but all subsequent requests to "127.0.0.1" fail with the error string "Network access is disabled". And this is not ok, because localhost requests should of course still be possible.

      Also see the attached demo program.

      NOTE: The problem does NOT arise if the program gets started with WiFi disabled. This is quite inconsistent in my opinion.

        For Gerrit Dashboard: QTBUG-59219
        # Subject Branch Project Status CR V

            manordheim MÃ¥rten Nordheim
            kai_nickel Kai Nickel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes