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

QTcpSocket waitForConnected fails with ConnectionRefusedError on localhost

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.9
    • 5.8.0
    • Network
    • None
    • Linux Desktop x86_64 Ubuntu 14.04
    •  c0157a9f035a27a3ba20cab0ca3ca1c6e78f0b14

      Hi,

      I have create a test application which connects to a Server on local host. If I execute the test application with Qt 5.8.0 the following code fails with AbstractSocket::ConnectionRefusedError.

      m_pSocket = new QTcpSocket(this);
      m_pSocket->connectToHost(host, 31234);
      bool bRet = m_pSocket->waitForConnected();
      

      In Qt5.7.1 and previous versions(5.5 and 5.6) the same code works fine.

      The Attachment contains a Unittest project.

        1. SocketUnitTest.zip
          6 kB
          Quirin Gylstorff
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            tpochep Timur Pocheptsov
            gylstorff Quirin Gylstorff
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes