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

QLocalSocket::abort() does not abort but wait for data to be sent

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • 4.8.0
    • 4.8.5
    • Network: Sockets
    • None
    • 663b742ca8b289e6456facf8b6a8ca18a4157fb7
    • 258c1a8537816f7b4c79e7cf4090a333768a10fa

    Description

      QTBUG-14939 seems to describe the exact same problem. The linked source changes in conjunction with labeling it fixed for 4.8 is seems invalid though, as I can still see the problem in 4.8.

      QLocalSocket::abort() is supposed to “immediately close”
      http://qt-project.org/doc/qt-4.8/qlocalsocket.html#abort

      QLocalSocket::abort() calls close()
      https://qt.gitorious.org/qt/qt/source/68a911862e05400ced87971c43fb27fb5d5d8ebd:src/network/socket/qlocalsocket_win.cpp#L361

      close() calls disconnectFromServer
      https://qt.gitorious.org/qt/qt/source/68a911862e05400ced87971c43fb27fb5d5d8ebd:src/network/socket/qlocalsocket_win.cpp#L429-431

      I have a client to a server. If server queued data for the client which he did not read for x time, the client is considered dead. Hence, the server wants to abort. My issue now is that abort() actually seems to wait for data delivery; 30 s.
      Specifically, in my use-case bytesToWrite() is > 0
      , thus going into `disconnectFromServer()`.

      Attachments

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

        Activity

          People

            peter-har Peter Hartmann
            kissaki Jan Klass
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes