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

QSocketNotifier for write triggers without connection.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.15.2
    • Core: I/O
    • None
    • MSys Mingw32
    • Windows

    Description

      Using MSys Mingw32, I have a non-blocking TCP socket created using the Berkeley sockets API. It is trying to connect to 127.0.0.1:50050. There is no service listening on that port at all. I am using QSocketNotifier instances for read, write, and error on the socket, instantiating and connecting them to the socket after calling connect().

      Almost exactly 2 seconds after the call to connect(), the QSocketNotifier for write activates. There is definitely no connection, so this should not happen.

      I have a different application that uses the same library, but uses select() to poll the sockets. It reports a socket error after 2 seconds.

      It looks like Qt is reporting a WRITE state when it should be reporting an ERROR state on failing to connect to a port on the localhost.

       

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            alastairgrowcott Alastair Growcott
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes