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

QTcpSocket is disconnected once the peer shuts down send/recv operations

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • Some future release
    • 5.3.0
    • Network: Sockets
    • None
    • Official Qt 5.3.0 for Windows 32-bit (MinGW 4.8.2, OpenGL)
      Windows 7 SP1 x64
      C++11 enabled

    Description

      When the remote peer uses shutdown any operation on its end, the local QTcpSocket closes the connection (RemoteHostClosedError).

      Native socket functions are perfectly fine with this, and do not close the connection.

      About the attachment:
      There are two QtCreator projects - server and client.
      Server listens on localhost:12345, and prints a message once a client disconnects.
      Client connects to localhost:12345, and attempts to shut down its write operation, it does not call disconnectFromHost anywhere.

      (C++11 compatible compiler required)

      Attachments

        1. example.zip
          2 kB
          Martin Richter
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            peter-har Peter Hartmann
            xmartin Martin Richter
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes