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

QNetworkSession::waitForOpened may time out if called in wrong states

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 4.7.1
    • None
    • detected in review

      If waitForOpened is called without a prior call to open(), or if close() has been called, then it will wait for the full timeout.
      Correct behaviour would be to return false immediately in both these cases.
      If used without a timeout, the application would hang.

      The problem is that d->isOpen = false, the session state is connecting or connected.
      Therefore waitForOpened will wait.

      However waitForOpened doesn't have visibility of the internal state of the backend.
      If it's not in the "opening" internal state, then waitForOpened should return false

      The symbian implementation has an isOpening bool variable which indicates this state.
      The other two implementations don't have a variable but have this state implicitly (in the cases where open doesn't complete synchronously).

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

            Unassigned Unassigned
            shkearns Shane Kearns
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes