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

QTcpSocket: confusing signals sequence

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Cannot Reproduce
    • Affects Version/s: 5.13.2
    • Fix Version/s: None
    • Component/s: Network: Sockets
    • Labels:
      None
    • Platform/s:
      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

            • Assignee:
              tpochep Timur Pocheptsov
              Reporter:
              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