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

QAbstractSocket::waitForConnected() shouldn't abort the connection process after the timeout has elapsed.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P5: Not important
    • None
    • 4.7.1
    • Network: Sockets
    • None
    • OS independent.

    Description

      Documentation for QAbstractSocket:.waitForConnected() says "If the function times out, the connecting process will be aborted."
      and indeed the source seems to suggest that when the timeout is reached the socket layer is forcibly reset.

      This makes aborting cleanly a slave thread that is stuck in a long waitForConnected() call impossible: the application will just
      hang until waitForConnected() exits. If one could call waitForConnected() with small timeouts repeatedly without resetting
      the connection the problem would be solved.

      Alternatively it should be possible to call abort() from a different thread for waitForConnected() to exit.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            pragma Szymon Tomasz Stefanek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes