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

QTcpSocket: confusing signals sequence

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.13.2
    • Network: Sockets
    • None
    • Windows

      When we connect two QTcpSockets lest name it sock1 and sock2 and then for sock1 we call consequently:

      sock1->write(...);

      sock1->flush();
      sock1->close();

      The sock2 receive signals in the following sequence:

      1. QAbstractSocket::error(RemoteHostClosedError)
      2. QAbstractSocket::disconnected
      3. QAbstractSocket::readyRead

      This order is confusing because after socket error hard to expect new data arriving and socket usually is closed. So the application with sock2 will not receive the message.

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

            tpochep Timur Pocheptsov
            boris_a Andrey Borisov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes