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

QTcpSocket: confusing signals sequence

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes