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

QTcpSocket will not connect to localhost without a router

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 5.9
    • Network
    • None
    • Qt5.9.2 linux (ubuntu)
    • Linux/X11

    Description

      I use QTcpSocket in a client program to connect to a local server application. Both apps are on localhost (127.0.0.1) on the same machine (laptop).   When QTcpSocket::connectToHost() is called to make a localhost connection to the server, it will succeed if the ethernet cable is plugged in to the laptop on which both apps are running. The ethernet cable connects to my router. However, if I unplug the ethernet cable, the connectToHost call reports QAbstractSocket::HostNotFoundError.

      I should not need to be connected to the router to access localhost. I am using Qt5.9.2

      Attachments

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

        Activity

          People

            tpochep Timur Pocheptsov
            martink12345 Martin Kohn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes